I\'m working with WPF and often have the need to get the namespace and assembly name of a given class. But I don\'t know how to do this.
So, how can we get the name
These should give you what you're after:
var assemblyName = typeof(ClassNameGoesHere).AssemblyQualifiedName;
var namespaceOfClass = typeof(ClassNameGoesHere).Namespace;
I see you've just added a note to your question regarding "when browsing the classes in the Solution Explorer", the simple answer is that as far as I know, you can't because that's not what Solution Explorer is for (it's there for browsing the files in a solution, not what's contained inside them) and also because:
You may want to see if the "Class View" gives you what you want, but, I suspect it won't.