+ 4
What is the difference between namespace and class in C#?
please help me thanks ;
2 Answers
+ 8
TurtleShell is correct. Namespaces are logical grouping for the Class in C#.
For example, we can have Pikachu.cs class under Pokemon.Electric namespace while Charizard.cs for Pokemon.Fire.
Hopefully it helps! đ
+ 3
Namespaces are used to group together classes, they are like packages in Java. For example you might be creating some maths classes which you could group into a myMaths namespace.
Classes are the âblueprintsâ for objects.