how to get number stored in string type values ?that values also contain characters("n12344")
This may not the perfect solution. But it may give an idea to how to solve your problem.
private void button1_Click(object sender, EventArgs e) { string ss = "N1234"; char[] test = ss.ToCharArray(); int length = ss.Length; for (int i = 0; i < length; i++) { if (!isNumeric(test.ToString())) { ss = ss.Remove(i, 1); } } MessageBox.Show(ss); } private bool isNumeric(string text) { int result; return int.TryParse(text,out result); }
||:.<IROSHAN>.:||
hi,
In VB you can remove character
Dim strString As String = "N12344" Dim strResalt As String strResalt = strString.Remove("N")