So I was told the other day that using public in c# is bad, so say I create a new class and inside that class I have a method, why is it better to declare it as
private void nameOfMethod()
rather than
public void nameOfMethod()
I'm just curious and cant seem to find an answer anywhere, was the person that told me not to use public wrong? Any help would be appreciated
EDIT I understand the difference between public private and protected perfectly fine, i just want to know why i was told it was better to avoid public