Friday, April 9, 2010
int.Parse is a simple method used to convert string to integer. It throws exception when null or invalid input is provided. Hence it is slow.
int.TryParse does not thow any exception instead we must describe second parameter as out parameter which holds result. And it returns boolean value representing success or failure.
Also Read other Top Articles
- JSON Serialization in VS 2008
- Implementing Forms Authentication in Silverlight Application.
- Making GridView Rows or Individual Cells Clickable and Selectable.
- Enabling browser back button for GridView Paging and Sorting in Ajax 1.1 and 3.5 (using Visual Studio 2005/ Visual studio 2008)
- How to pass values from User Control to Page or calling Page methods from User Control.
- What is WCF?
- New features in C# 4.0
- C# to VB.NET and VB.NET to C# online free converter tools.