Private & Public declarations in C# -
this question has answer here:
is there way in c# declare group of variables , methods private or public in c++ (example below). trying avoid typing million "public"s , "private"s.
class foo { private: int alpha; string dog; public: bool bites; bool bad; }
i keep getting error in c# , have exhausted internet search abilities. thanks
no. need specify visibility each member.
private
default members, safe omit (unless coding guidelines tell must specify). more details/links - default visibility c# classes , members (fields, methods, etc)?
Comments
Post a Comment