All Content
Blogs
Forums
News
Tutorials
Log In
Sign Up
Login
Username / Email
Password
Remember me
Forgot password?
Login
or
Don't have a GameDev.net account?
Sign up
Forgot your password?
Email Address
Reset Password
Please contact us if you have any trouble resetting your password.
Home
Blogs
Forums
News
Portfolios
Projects
Tutorials
42
users logged in
New?
Learn about game development
.
Before posting, review our
community guidelines
.
Follow Us
Chat in the
GameDev.net Discord!
Mastodon
Back to General and Gameplay Programming
[.net] [C#]Get/Set Array
General and Gameplay Programming
Programming
Started by
Uphoreum
December 13, 2006 03:47 PM
1
comment, last by
Uphoreum
17 years, 4 months ago
Uphoreum
216
Author
December 13, 2006 03:47 PM
Could someone give me an example of how to get/set a 2-Dimensional array?
Cancel
Save
Advertisement
AngryDwarf
122
December 13, 2006 03:56 PM
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;}
}
Cancel
Save
Uphoreum
216
Author
December 13, 2006 04:04 PM
Thanks man.
Cancel
Save
This topic is closed to new replies.
Advertisement
Popular Topics
The promise of freedom in story games
Game Design and Theory
Facebook Ads for sales on steam, does it work?
Games Business and Law
Inheriting from application registered class
AngelCode
Advertisement
Recommended Tutorials
Incremental Development
Business and Law
Case study: How to launch on Epic Games Store with Hybrid Cloud Hosting
Networking and Multiplayer
Spring RTS Engineering Internals
Music and Sound FX
Tom Sloper's Format for Game Design Specifications
Game Design and Theory
36 Dramatic Situations
Game Design and Theory
Reticulating splines
About GameDev.net
Community Guidelines
Terms of Service
Privacy Policy
Contact Us
Copyright (c) 1999-2024 GameDev.net, LLC
Back to Top