In C++ you can write:
private:
int w;
string x;
protected:
int y;
string z;
is there something similar in C# ?
In C++ you can write:
private:
int w;
string x;
protected:
int y;
string z;
is there something similar in C# ?
you can't but see this it could help
private int x,y,z; private string x,y,z
No, there are no regions with a specific access type in C#. Every member of a class or struct must have an explicit access modifier or accept the default access modifier private.
Also, on the topic of access modifiers in C# compared to C++, C# has two additional modifiers internal and protected internal. The modifier internal means that it is visible only within the defining assembly and protected internal means protected or internal (NOT protected and internal).
You could define your region with #region Private...#endregion , #region Protected...#endregion etc.