Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 11th, 2006, 01:00 AM
Authorized User
 
Join Date: Jun 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with the namespace & classes

Hi guys,

I have a DLL with a class named Test_Remoting with a namespace Testclass.The code is like this


    Dim tmp As Object
    tmp = System.Type.GetType("System.String")
    tmp = System.Type.GetType("TestClass.Test_Remoting")


The problem is when i write
     tmp = System.Type.GetType("System.String")
it returns a value but when I write
     tmp = System.Type.GetType("TestClass.Test_Remoting")
which refers to my class it refers to Nothing.
I have been breaking my head against this for a very long time.I simply cant und what is the problem.
Please guys help me out.

Thanks in advance.




 
Old November 6th, 2006, 04:43 AM
Registered User
 
Join Date: Nov 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

System.Type.GetType() method requires fully qualified name of the type. So if the assembly. If the type is in mscoflib.dll then it is sufficiant to supply type name followed by the namespace. To get the fully qualified name of type refer to the following article.
http://msdn2.microsoft.com/en-us/library/2exyydhb(VS.80).aspx
Hope this helps.

Regards,
Chandrak
 
Old November 25th, 2006, 02:13 PM
Authorized User
 
Join Date: Sep 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi ,
 while getting type informatio of our types
1)dll must be inside BIN directry
2) use system.gettype(assembly name,namespace.typename)
assembly name is our dll (without extension)







Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with namespaces & classes ayamas General .NET 1 October 12th, 2006 03:11 PM
Problems with namespace & classes ayamas Visual Studio 2005 0 October 12th, 2006 08:56 AM
Can I enumerate through the classes in a Namespace MAtkins General .NET 3 August 1st, 2005 11:58 AM
NAMESPACE & REFERENCING PROBLEM WHEN REBUILDING 3Moose BOOK: ASP.NET Website Programming Problem-Design-Solution 4 January 16th, 2005 12:16 PM
PhileIdentity & PhilePrincipal Classes chiefg BOOK: ASP.NET Website Programming Problem-Design-Solution 1 February 11th, 2004 06:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.