Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
.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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 11th, 2006, 01:00 AM
Authorized User
 
Join Date: Jun 2006
Location: , , .
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.




Reply With Quote
  #2 (permalink)  
Old November 6th, 2006, 04:43 AM
Registered User
 
Join Date: Nov 2006
Location: Pune, Maharshtra, India.
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
Reply With Quote
  #3 (permalink)  
Old November 25th, 2006, 02:13 PM
Authorized User
 
Join Date: Sep 2006
Location: , , India.
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)


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 03:38 PM.


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