473,397 Members | 2,077 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Using Type.GetType in an already loaded assembly

TN
I have an application that is using System.Windows.Forms. I'd like to
use Type.GetType() to get a Type so I can create an instance of it using
reflection. The only way I can get it to return the type is:

Type tt = Type.GetType(
"System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089");

Since (I assume) when my application is running System.Windows.Forms
assembly is already loaded, there must be a way to get the type from the
loaded assembly, instead of having to specify version/culture/token
information.
Can anyone shed some light on this dim bulb?
Thanks.
Jan 26 '06 #1
1 1834
1. obtain assembly reference for example from
AppDomain.GetAssemblies
2. search type in well-defined assembly
Assembly.GetType

Jan 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: MarkB | last post by:
I am new to using reflection, and I can't understand why this code fails for sClass="CheckBox" 'get loaded assemblies oAssemblies = AppDomain.CurrentDomain.GetAssemblies() 'find our type in...
1
by: Jean Stax | last post by:
Hi ! I created a sample library project. In my second project I reference this library and make the following call, which returns "undefined value": Type myType =...
1
by: Sacha | last post by:
If I use Assembly.LoadFile("name.dll") and then I want to create instace of class inside the assembly using reflection Type.GetType("class.name") doesn't work unless I do Assembly asm =...
2
by: Jax | last post by:
I'm having difficulty with creating dynamic types, TypeBuilder is attained through module builder which in turn comes from assembly builder. I assumed that if you save the assembly you'd save the...
1
by: hazz | last post by:
"Value cannot be null.\r\nParameter name: type" is the exception thrown after the CreateInstance method below. Type t = Type.GetType(GetConfigValue("PasswordProvider")); IPasswordProvider ppdr=...
4
by: Max | last post by:
Hi, I would like to have a button and a combo box with options to select various versions of Microsoft Outlook: 2002, 2003. The user selects the email client and clicks the button. The only...
16
by: Andrew Ducker | last post by:
Is there any way to use Type.GetType to return a type that's in an Assembly loaded from disk? I sadly _have_ to use Type.GetType, as it's in framework code I can't change. At the moment, I'm...
1
by: lit | last post by:
I want to use Type.GetType(typeName) for a class defined in an assembly that will be in the GAC. I understand that I must provide strong name information such as the KeyPair or versioninfo in the...
4
by: Dan Manges | last post by:
Given a type as a string, is there an easy way using reflection to find where it resides in the .NET framework? Example: Given "XmlNode", get "System.Xml" Given "ArrayList", get...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.