asp.net中在一个字符串中判断包孕在里面的数字位置

asp.net中在一个字符串中判断包含在里面的数字位置asp.net中在一个字符串中判断包含在里面的数字位置。例如

asp.net中在一个字符串中判断包含在里面的数字位置
asp.net中在一个字符串中判断包含在里面的数字位置。例如abcdef123der,怎么才能知道这个字符串中数字在那个位置。
[解决办法]


string txt = "abcdef123der";
for (int i = 0; i < txt.Length; i++)
{ 
    int parse;
    if (int.TryParse(txt[i].ToString(),out parse))
    {
        Console.Write("位置:" + i.ToString());
        break;
    }                
}

[解决办法]
 int index = Regex.Match("abcdef123der", "\\d").Index;