Hi,
To your example, above, do this:
private bool is_double(string val)
{
try
{
Convert.ToDouble(val);
return true;
}
catch
{
return false;
}
}
private void separate_word()
{
string text = "4.2 Minutes";
string[] arr = text.Split(' ');
string letter, number;
foreach(string item in arr)
{
if(this.is_double(item))
{
number = item;
}
else
{
letter = item;
}
}
}