There is no equivalent in C # (also VB and F #).
Personally, I like this difference. I work on a very large base of C ++ code, and there is no way to look at a specific method and find out its special availability. Some of the classes have become so large that it takes a significant amount of page scrolling to see the modifier.
Some coders may think that this is not bad, but think about what happens when people start mixing in #if defs in the middle of the class and adding modifiers to these # if. This makes the definition of an access modifier during code verification a nontrivial operation.
This is a small print sacrifice for adding an inline modifier, but it is worth it to be able to read for a long time.
source share