TryParse
for Int32, long, byte, and decimal
return Boolean
Int32.TryParse( s as String, ref i as int32) [VB]
Int32.TryParse(String s, out int32 i) [C#]
long.TryParse( s as String, ref i as int32) [VB]
long.TryParse(String s, out int32 i) [C#]
http://msdn.microsoft.com/zh-tw/library/bb384043.aspx
for Int32, long, byte, and decimal
return Boolean
Int32.TryParse( s as String, ref i as int32) [VB]
Int32.TryParse(String s, out int32 i) [C#]
long.TryParse( s as String, ref i as int32) [VB]
long.TryParse(String s, out int32 i) [C#]
int32.TryParse(s, out i)
http://msdn.microsoft.com/zh-tw/library/bb384043.aspx
留言