|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
GetType questionI 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) -- Show quoteHide quoteKevin 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? 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? > >
"Send To Mail Recipient"
Interesting Results In VB.Net Shared dll paths VB.NET reading CSV files (odbc or oledb) Any 'Windows Service' Experts? Why can't I capture the screen?? position in array using a string Error Handling: load text file into TextBox Recursion with a Tree View and checkboxes Missing DataGrid RTF and word tables |
|||||||||||||||||||||||