Windows Phone Developers

Showing posts with label C# Conversion. Show all posts
Showing posts with label C# Conversion. Show all posts

Wednesday, October 22, 2008

Convert String to Long using C#

Int64..::.Parse Method converts the string representation of a number to its 64-bit signed integer equivalent. This can be used to convert the string to long as shown below

public long Convert2Long(String Str1)

{

try

{

long LngString = Int64.Parse(Str1);

return LngString;

}

catch (System.FormatException)

{

Console.WriteLine("Parameter is not in required format");

return -1;

}

}


Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon