How to declares a two-dimensional array in C#?



How to declares a two-dimensional array in C#?..

Answer / Hariom Singh

In C#, you can declare a two-dimensional array by using nested square brackets []. Here's an example:n```csharpnint[,] myArray = new int[3, 4]; // Declares a 2D array with 3 rows and 4 columns```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Hello.. This is kali prasad. i wish to learn C#. kindly guide me in making me expert in c#.

2 Answers  


What is .net c#?

1 Answers  


Why abstract class is not instantiated in c#?

1 Answers  


Can we inherit private members of class in c#?

1 Answers  


C Sharp

1 Answers   Wipro,


Give an example to show for hiding base class methods?

1 Answers  


Can we inherit partial class in c#?

1 Answers  


Is predicate a functional interface?

1 Answers  


Explain what are three test cases you should go through in unit testing?

1 Answers  


What is the difference between do and while loop?

1 Answers  


What is Reflection in .NET? Namespace? How will you load an assembly which is not referenced by current assembly?

1 Answers  


Is array value type in c#?

1 Answers  


Categories