Wednesday, 7 August 2013

Private & Public declarations in C#

Private & Public declarations in C#

Is there a way in C# to declare a group of variables and methods as
private or public like in C++ (example below). I am just trying to avoid
typing a million "public"s and "private"s.
class Foo
{
private:
int Alpha;
string Dog;
public:
bool Bites;
bool Bad;
}
I keep getting an error in C# and have exhausted my internet search
abilities. Thanks

No comments:

Post a Comment