Solved

# How to convert string myArray[310,120] to int myArray[310,120]

Posted on 2011-10-21
503 Views
Last Modified: 2012-08-13
Hi,
how to convert string myArray[310,120] to int myArray[310.120]
or
string myArray[310,120] to int myArray2[310,120]
and
int myStringArray[310,120] to myIntArray[310,120]
.

Best Regards,
ocaccy
0
Question by:ocaccy
5 Comments

LVL 9

Accepted Solution

Try this
``````string[] strings = new[] { "310", "120" };
int[] ints = strings.Select(x => int.Parse(x)).ToArray();
``````
0

Author Comment

Thank you sachinpatil10d.

Are multidimensional arrays in C #.

How to convert intArray [10,10] to stringArray[10,10]
and stringArray[10,10] to intArray [10,10]?
0

LVL 9

Assisted Solution

Try this

``````            string[] strings = new[] { "10", "10" };
int[] ints = strings.Select(x => int.Parse(x)).ToArray();
string[] newstrings = ints.Select(y => Convert.ToString(y)).ToArray();
``````
0

Author Comment

Forgive me,  and very grateful for the attention.

The array has 10 columns and 10 rows.

Regards,
ocaccy
0

Author Closing Comment

Very good, this comments solves my problems.
Thank you.
0

## Write Comment

Please enter a first name

Please enter a last name

We will never share this with anyone.

## Featured Post

First I will try to share a design of a Veeam Backup Infrastructure without Direct NFS Access backup.  (https://1.bp.blogspot.com/-O7HItxPwff0/VsiyvNuUgaI/AAAAAAAAAgE/z8RdsBKkkwI/s1600/Copy%2BVeeam%2BBackup.jpg) Note: Direct NFS Access backup …
This is similar to the error described in my previous Article, but with a different source problem and a different solution. When trying to scan and stage the ESXi 6.0 updates using VMware Update Manager, we can get "error code 90"
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
In this video tutorial I show you the main steps to install and configure  a VMware ESXi6.0 server. The video has my comments as text on the screen and you can pause anytime when needed. Hope this will be helpful. Verify that your hardware and BIO…

#### 737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

#### Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!