Search This Blog

Showing posts with label without library functions. Show all posts
Showing posts with label without library functions. Show all posts

Monday, January 25, 2010

How to convert string to integer in c# without the predefined functions or methods

Hi guys,

Here is an interesting post for you all. How to convert a string input (e.g. "123", "325", or "1346" ) to an integer without using the predefined or library functions provided by dotnet framework (or c# language library functions).

Its pretty easy one to implement once you get an idea about it.

Here is a sample code for converting string to an integer using the technique "ascii characters".