You don’t have to create a new class to do it as @KMKxJOEY1 says, you can use real nested arrays.
string myString = "123" + '
’ + “456” + ’
’ + “789”;
string[] words = myString.Split('
');
int[][] intArray = new int[words.Length][];
for (int i = 0; i < words.Length; ++i)
{
intArray _= new int[words*.Length];*_
for (int j = 0; j < words*.Length; ++j)* { intArray_[j] = System.Convert.ToInt32(“” + words*[j]); } }* Assuming the numbers have only one digit and the separator between rows is a new line._
public intArray[] array;
public class intArray{int[] array}
Hi there, thanks for your response. I don't understand exactly how it would work. Can you just add 2 or 3 lines to your code to give me a hint? Thanks a lot!
Hi there, thanks for your response. I don't understand exactly how it would work. Can you just add 2 or 3 lines to your code to give me a hint? Thanks a lot!
– ez06