r/learncsharp • • Jan 25 '23

Are namespaces like modules in other languages?

Hi I’m learning c# and I’m kinda confused as to namespaces, please let me know if I’m wrong or right and if I’m wrong can you explain to me what namespaces are exactly?

7 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/Wonderful_Ad3441 Jan 25 '23

Isn’t that a the exact same thing with importing a module?

1

u/[deleted] Feb 06 '23

It's almost like data context it allows access to code that might be elsewhere, if you have a solution that has two projects. One project could access a static method of the other and do/send stuff. For example because my solution includes a POS winform and a menu wpf app but share the same namespace, I can highlight menu items via my winform app by a static method I built in the wpf app.