I have a value like this ab48/2012
. How to extract the numbers from this string? I need to store 48
in one variable and 2012
in another variable.
Is it possible to extract numbers without using the substring function? If it is possible, please help me.
I have tried like this
string Value = "ab48/2012";
string[] array = value.Split('/');
int Value1 = Convert.ToInt32(array[0].Substring(2));
int Value2 = Convert.ToInt32(array[1].ToString());