Tablica dwuwymiarowa

0
            string[][] temp = new string[2][];
            string[] temp2 = {"1","2","3"};

            for (int x = 0; x < temp2.Length; x++)
            {
                temp[0][x] = temp2[x];
            }

            for (int x = 0; x < temp2.Length; x++)
            {
                temp[1][x] = temp2[x];
            }

"Odwołanie do obiektu nie zostało ustawione na wystąpienie obiektu."

0

Tablica dwuwymiarowa to to, co @Ciekawski napisał w komentarzu.
To, co Ty zrobiłeś, to tablica tablic. Definiując temp zdefiniowałeś tylko tą "zewnętrzną" tablicę, nie zdefiniowałeś jeszcze żadnego jej elementu (który w tym przypadku jest tablicą stringów). Dlatego nie możesz się do nich odwoływać, bo one nie istnieją. Musisz najpierw je zdefiniować, np.:

temp[0] = new string[666];
0

Dla potomnych:

            string[][] temp = new string[2][];
            string[] temp2 = {"1","2","3"};
 
            temp[0] = new string[temp2.Length];
            for (int x = 0; x < temp2.Length; x++)
            {
                temp[0][x] = temp2[x];
            }

            temp[1] = new string[temp2.Length];
            for (int x = 0; x < temp2.Length; x++)
            {
                temp[1][x] = temp2[x];
            }
0
string[][] temp2 = {
                     new[]{"1","2","3"},
                     new[]{"1","2","3"}
                   };

1 użytkowników online, w tym zalogowanych: 0, gości: 1