if i pass a string (verstring == \"vername.1.19.5\") it will return the version because i am ignoring Currentver[0]. if i want to pass verstring == \"1.19.5\".
I mean i
Why making life harder as it already is?
string v = verstring.Replace(':','.').Substring(5,verstring.Length);
Now you don't need to care about whether it actually is separated by :
or .
you can simply split by .
:
currentVer = v.Split('.');
a= Convert.ToByte(currentVer[1]);
b= Convert.ToByte(currentVer[2]);
c= Convert.ToByte(currentVer[3]);