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:
- One file can contain multiple
classes
- All files in one project
will, generally, always compile down
to a single assembly, making it
redundant to display that name for
each file.
You may want to see if the "Class View" gives you what you want, but, I suspect it won't.