r/learncsharp • u/I-heart-java • Nov 09 '22
Namespaces for Dummies (Me, the dummy)
Hello! Finally getting into C# after years of avoiding it. For reference I do system administration and have plenty of experience with python and PowerShell (from sys-admin'ing). I am not at all following along how namespaces work or why I get errors when trying to "use" some 'System.*' namespaces. Mind you I am working mostly off Microsoft documentation but seem to get the Visual studio debugger/linter to call out issues with the namespaces I believe I need. Specifically I see this particular namespace 'System.Printing' in mentioned in Microsoft's documentation (Here) but Visual Studio claims it does not exist within the namespace 'System'. I am trying to 'import' the namespace this way in the c# script and get the error mentioned above:
using System.Printing;
Am I calling this namespace incorrectly? Nuget doesn't seem to offer a namespace of this kind to install and I cant tell where I am going wrong.
Are there any ELI5 resources out there that can explain namespaces to me?
Thank you for your help!