C# Making private instance variable accesable (jagged array)
Posted
by Chris
on Stack Overflow
See other posts from Stack Overflow
or by Chris
Published on 2010-05-05T16:44:53Z
Indexed on
2010/05/05
16:48 UTC
Read the original article
Hit count: 118
c#
Hello,
In a attempt to put some more oop in a program i am looking to make a private instance variable in one class (object) accesable to a class.
private byte [][] J;
All those code refers to this jagged array with this.
Now in the other class i putted all the for loops along with the consolewritlines to display the wanted results. Basicly it says "the name J does not exist in the current context"
But how exactly do i make this J accesable?
I have tried with get and set but i keep getting 'cannot convert to byte to byte[][]'
Also what kind of cyntax would i need with get and set?
Something along like this? Or would i need several more steps? :
public Byte JArray
get { return J; } //can converrt to byte here
set { J = value; } //cannnot convert to byte here
Kind regards
© Stack Overflow or respective owner