Sign in to follow this  

[.net] [C#]Get/Set Array

Recommended Posts

To declare a 2D array:

public int[,] _2dArray

To do a 2D get/set:

public int this[int a, int b]
get { return _2dArray[a,b];}
set { _2dArray[a,b] = value;}

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this