【发布时间】:2016-07-14 13:13:35
【问题描述】:
我正在尝试将字符串的第一个索引转换为 int,但我不能。有人可以解释如何访问字符串的索引并将其转换为 int 吗?
string a = "5"
public static bool VerificacaoNumero(string a, int[,] tabuleiro)
{
int b = a[0];
return true;
}
【问题讨论】:
-
帖子中没有
StringBuilder的踪迹... -
(基于您正在寻找的示例代码how to check if the character is an integer,这对我来说看起来像是完美的复制品)。
标签: c# string function methods stringbuilder