4

Possible Duplicate:
Default visibility for C# classes and members (fields, methods, etc)?

Is a C# field by default private? In general is there a guide (possibly a msdn guide) that specifies these things? When you ommit a modifier, which one is used? Thanks indeed.

Community
  • 1
  • 1
Sunscreen
  • 3,452
  • 8
  • 34
  • 40

2 Answers2

7

Yes, it is private by default. More discussion around it in this and this question.

Community
  • 1
  • 1
Peter Lillevold
  • 33,668
  • 7
  • 97
  • 131
4

All type members are private by default.

leppie
  • 115,091
  • 17
  • 196
  • 297