C# Why won't this substring work? Error: Input string was not in a correct format -


The problem is with converting the txt box value, but why?

  string strChar = strTest.Substring (0, Convert.ToInt16 (txtBoxValue.Text));  

Error: The input string was not in the correct format.

Thanks all.

txtBoxValue.Text probably does not have a valid int16.


Comments