Convert String Array to Long Array

June 3, 2010 at 11:08 am 1 comment

Hey folks,

As I told you I am back within no time.

Yesterday, I have faced a problem where I want to convert string array into long array. I need to search a lot in internet for solving this and after a lot finding I came to this simple solution.

string[] strArray = { “xyz”, “abc”, “def” };
Long[] lArray = Array.ConvertAll<string, long>(strArray, Convert.ToInt64);

it’s so simple, cheers :-)

Entry filed under: ASP.Net. Tags: , , .

The selected class cannot be deleted because it is used as the return type for one or more DataContext methods. Decode html through javascript

1 Comment Add your own

  • 1. Vimal  |  June 3, 2010 at 11:50 am

    This is really a simple and awesome solution……….

    Thanks
    Pranav

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Recent Posts

Feeds


Follow

Get every new post delivered to your Inbox.