C
C#9mo ago
Livid

✅ public or local

hey if i have a class like this
public class Dog {
public int publicInt;
int isThisPublic?;

method() {}
}
public class Dog {
public int publicInt;
int isThisPublic?;

method() {}
}
4 Replies
Livid
Livid9mo ago
is the 2nd integer accesable from other classes (in instances of this class)?
Thinker
Thinker9mo ago
If you don't specify an accessibility level then the member will be private.
Livid
Livid9mo ago
oh okay ty
Thinker
Thinker9mo ago
In general, if you don't specify an accessibility level then the thing will default to the lowest accessibility, which is private for members and internal for types.
Want results from more Discord servers?
Add your server
More Posts