I am writing a program which needs the namespace of the program but I cant seem to figure out how to retrieve it. I would like the end result to be in a string.
I wa
You could simply use typeof and then pass in the class (I.e. Program):
Console.WriteLine(typeof(Program).Namespace);
Which would print:
ConsoleApplication1