Home All Groups Group Topic Archive Search About
Author
25 Apr 2006 3:58 PM
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.

Author
25 Apr 2006 5:48 PM
Kevin Westhead
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)

--
Kevin Westhead

Show quoteHide quote
"Craig Buchanan" <n***@company.com> wrote in message
news:euNB8DIaGHA.1560@TK2MSFTNGP03.phx.gbl...
>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?
Author
25 Apr 2006 8:35 PM
Craig Buchanan
I get:    Lucky.Folder, FolderPlugin, Version=1.0.2306.14634,
Culture=neutral, PublicKeyToken=null

I want:    Lucky.Folder, FolderPlugin

Thanks.

Show quoteHide quote
"Kevin Westhead" <mapson.mapson@nospam.nospam> wrote in message
news:%23iZdnBJaGHA.4916@TK2MSFTNGP04.phx.gbl...
> 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)
>
> --
> Kevin Westhead
>
> "Craig Buchanan" <n***@company.com> wrote in message
> news:euNB8DIaGHA.1560@TK2MSFTNGP03.phx.gbl...
>>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?
>
>