Saumendra
Dim strNameSpace As String =
Reflection.Assembly.GetExecutingAssembly.GetName.Name.ToString
--
Happy to help,
-- Tom Spink
(thomas...@ntlworld.com)
"Saumendra" <s...@no-spam.com> wrote in message
news:Oez2NbpF...@TK2MSFTNGP10.phx.gbl...
Saumendra
Hi Tom,
The code that u pr
"Tom Spink" <thomas...@ntlworld.com> wrote in message
news:OVsR8a7F...@tk2msftngp13.phx.gbl...
Why not get *any* type in the assembly and take the first part of the string
(up to "."c)?
--
Armin
Saumendra
> Why not get *any* type in the assembly and take the first part of the
string
> (up to "."c)?
>
> Armin
Imports System.Reflection
'...
Dim Assy As [Assembly]
Dim Types As Type()
Dim Pos As Integer
Dim TypeName As String
Assy = [Assembly].GetExecutingAssembly
Types = Assy.GetTypes()
TypeName = Types(0).FullName
Pos = TypeName.IndexOf("."c)
MsgBox("Root namespace: " & TypeName.Substring(0, Pos))
--
Armin
There is a property called "DefaultNamespace" under the "Visual Basic and
Visual C# ProjectItem Object" mentioned in the docs, and I have struggled
one whole day behind it and I just can't figure out how to use it. There is
a namespace called "VSLangProj" and I guess I have to make use of it. This
is done by adding a reference "VSLangProj" to the project and then
importing VSLangProj.
Any other suggestions ??
becuase it will then show the root namespace of the class that is
"Armin Zingler" <az.n...@freenet.de> wrote in message
news:%23JvKlJB...@TK2MSFTNGP10.phx.gbl...
At runtime, there is no "root namespace" information. It's just there for
the compiler in which namespace to put the classes. BTW, I've never had a
project without a root namespace so far.
--
Armin
Hope this helps.
Abel, VB Team
This posting is provided "AS IS" with no warranties, and confers no rights.