Namespaces and Imports
I was surprised to discover that in C# you can have multiple files containing code that belongs to the same Namespace. Coming from Python, I didn’t even think of defining the Namespace - I was used to using the file name and directory names (if the directory was a module) to write the imports.
Another difference is that using
in C# works differently from import
in Python. My impression is that import
is by default more explicit (if you import os
, you will have to specify os.path
), though I may be missing more existing possible approaches in C#.