- Home /
Private vs no access modifier? (C#)
MonoDevelop tells me the variables are private by default and there is no point in using "private". Is it better to use private access modifier for private variables or just nothing?
Answer by LK84 · Oct 05, 2016 at 07:34 AM
There is no difference!
True, AFAI$$anonymous$$ the compiler just translates that into private anyway... Though, I still prefer to type it, lol.
Answer by BenHolz · Oct 05, 2016 at 08:05 AM
It’s more a question of code style. I personally find it more readable to always use the private keyword. But you can do whatever you find better, just remember to be consistent with your choice.
Your answer

Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
[Solved] How to disable function in same script? C# 2 Answers
Game Center login issue 0 Answers
Help me finish my room generator 0 Answers