+ 1

namespace in c#

Hello, I was learning C++ but was convinced that c# would be easier an better for my gaming puposes and I have finished the basics and can't understand namespace. In c++ I can use something like namespace std that allows me to use the standard library. Here in C#we have namespace sololearn and I google search a little and foubd stuff like namespace helloworld. I simple can't understand the use of namespace in C#

9th Jun 2017, 11:19 AM
Willian Souza
Willian Souza - avatar
4 Respuestas
+ 2
Correct. For example System is a namespace. A lot of classes are shared in the System namespace like Console and IO.
9th Jun 2017, 12:04 PM
sneeze
sneeze - avatar
+ 1
namespace is a super class. Most of the time a company name is used. Namespace : NiceCompany ProjectA ProjectB share functionality between projects now we can call NiceCompany. ProjectA NiceCompany. ProjectB Most of The time you do not notice that you are working in a namespace. In small projects you do not need to
9th Jun 2017, 11:36 AM
sneeze
sneeze - avatar
0
So, it's like namespace is the name of whatever I'm working with and it can be used to share functions? That's interesting
9th Jun 2017, 11:46 AM
Willian Souza
Willian Souza - avatar
0
I see, thanks for the help!
9th Jun 2017, 4:21 PM
Willian Souza
Willian Souza - avatar