C# various type conversions

Article directory

string converted to long type

string str="123456";
方法一:
long a=long.Parse(str);
方法二:
long b=Convert.ToInt64(str);

Guess you like

Origin blog.csdn.net/qq_38110067/article/details/119899891