GetType question

  • Thread starter Thread starter Craig Buchanan
  • Start date Start date
C

Craig Buchanan

I would like to have a string representation of my classes type and assembly
in format of full name, assembly.

Me.GetType() gets me the fullname

Me.GetType().AssemblyQualifiedName gets me much more than i want.

is there a better way?

thanks in advance.
 
Can you clarify what Type.AssemblyQualifiedName is giving you that you don't
want, perhaps with an example of your desired output?

If you're only interested in the simple name of the assembly then you could
try the following (not compiled):

Dim t As Type = Me.GetType()
Dim s As String = String.Format("{0}, {1}", t.FullName,
t.Assembly.GetName().Name)
 
I get: Lucky.Folder, FolderPlugin, Version=1.0.2306.14634,
Culture=neutral, PublicKeyToken=null

I want: Lucky.Folder, FolderPlugin

Thanks.
 
Back
Top