Problem with an array in C#. How to print an array? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Problem with an array in C#. How to print an array?

Hello, first i have a variable set to #. string a = “#“; Than I have an string array with some variables inside: string [,] name = new string [,] { {“_“}, {a}}; Later in this code, i set the variable a to “O“. At the end i print the array name with foreach. But always, where the variable a is, there is # printed for the variable instead of O. I dont understand why it doesn't work. I hope you understood my problem and can help me.

7th Sep 2019, 7:23 PM
Peter Möhle
Peter Möhle - avatar
0 Answers