|
-
December 15th, 2009, 07:15 PM
#1
Public arrays?
Hey,
In Visual C# how do I make an array that can be used in private and public functions. Visual Studio won't let me use public to declare it. Example below.
private void main()
{
int[,,] test = new int[100,100,3]; //this works
public in [,,] test = new int [100,100,3]; //this produces and error!
}
public int laterfunction(int x, int y)
{
test[x,y,0] = 27; // doesn't exist in current context!?!?!
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|