C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
Java
Learn iOS Programming
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
5
Reply
How to declares a two-dimensional array in C#?
Vinod Dua
13y
25.9k
1
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
string[,] strArray= new string[3,3];You can also instantiate it in the same line with array initializer syntax as follows:string[,] strArray = new string[3, 3] {{"a","b","c"},{"d","e","f"}, {"g","h","i"} };For more about the Multidimension array. You can refer following Link. http://msdn.microsoft.com/en-us/library/2yd9wwz4(v=vs.71).aspx
Keyur Patel
12y
0
string[,] strArray= new string[3,3];You can also instantiate it in the same line with array initializer syntax as follows:string[,] strArray = new string[3, 3] {{"a","b","c"},{"d","e","f"}, {"g","h","i"} };For more information about the Multidimensional Arrays
Keyur Patel
12y
0
int[,] myArray = new int[4,2];
Akshay Patel
13y
0
int[,] myArray = new int[4,2];
Akshay Patel
13y
0
Two Dimensional Array: These are arrays which represent data in the forms of rows and columns. Int [,]=new int[3,4]; Or Int[,] arr; Arr=new int[2,3]; We can identify each and every cell by using row and column index as following: Int [,] arr=new int[4,5]; Arr[0,0]=5; Arr[0,1]=10; We can use getlength method to find no. of rows and column as following: Arr.getlength(0) for Rows Arr.getlength(1) for columns Class tdarray { Static void main() { Int a=5; Int[,] arr=new int[4,5]; For( int i=0;i
Mandar Desai
13y
0
Explain the difference between event and a delegate in c#?
What is strong name in c# and how can we use it?
Message