C# Language Access Modifiers

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Remarks

If the access modifier is omitted,

  • classes are by default internal
  • methods are by deault private
  • getters and setters inherit the modifier of the property, by default this is private

Access modifiers on setters or getters of properties can only restrict access, not widen it: public string someProperty {get; private set;}



Got any C# Language Question?