Best C# practice with Classes

Updated on December 30, 2016 in Discussions
Share on Facebook0Tweet about this on Twitter0Share on Google+0Share on Reddit0
4 on December 29, 2016

What is the better C# practice: keep Classes separate under the Namespace, or nest a Class into another?
What are you thoughts and when do you feel it is best to use either approach?

  • Liked by
Reply
1 on December 29, 2016

Depends on what each class is used for

on December 29, 2016

That is what I was looking for, what are the situations you would create them one way over another? And of the two ways, which is your default?

Show more replies
  • Liked by
Reply
Cancel
1 on December 29, 2016

Most public classes are sitting in just a namespace. Only for classes that are not public should be considered putting in another class.

on December 30, 2016

Thank you Dion, that makes sense.

Show more replies
  • Liked by
Reply
Cancel