What I want is to take the numerical value of a string for example IMP_5, take only 5 that would be in the last row of a DataGridView. The last row of records of all you have.
Someone can help me.
What I want is to take the numerical value of a string for example IMP_5, take only 5 that would be in the last row of a DataGridView. The last row of records of all you have.
Someone can help me.
This could be done using a regular expression.
Example:
using System.Text.RegularExpressions;
string soloNumeros = Regex.Match("IMP_5", @"\d+").Value;
int numero = Convert.ToInt32(soloNumeros);