可能重复: c#将char转换为int
这有效:
int val = Convert.ToInt32("1");
但这不是:
int val = Convert.ToInt32('1'); // returns 49
这不应该转换为实际的int吗?
c#
c# ×1