S
S
stdio962018-12-07 00:32:42
C++ / C#
stdio96, 2018-12-07 00:32:42

How to declare an array of this type in c#?

Hello.
Can you tell me how to create an array of this type using standard C# tools

?
Tried through char[], char[,] and so on. So far I've settled on the next option.
char[][] jaggedArray =
        {
            new char[] { 'A', 'B', 'C' },
            new char[] { 'A', 'C' },
            new char[] { 'A', 'B' }
        };
but I think there must be some other way(s). List is not quite suitable (although this option is interesting to look at), so I'm more interested in a simple way.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
eRKa, 2018-12-07
@stdio96

There are no other ways like char[][] .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question