C# FAQ: How convert string to int

Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio


Jump to: navigation, search
CSharp-Online.NET:FAQs
edit

How convert a string type to an int type?

For general type conversions, consult the System.Convert method first. System.Convert features static methods for most everyday type conversions.

When converting from a type String, determine whether the type to be converted to has a Parse method. In fact, the method name may be derived from the word parse. For example, the DateTime.ParseExact method can be used to convert from a type String to a type DateTime.



Personal tools