473,406 Members | 2,710 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,406 software developers and data experts.

hot to differentiate outer classes and nested classes in late binding


when loading this dll into an assembly via late binding how do i
diferentiate between outer CAsmToLoad class and the inner class CAsmToLoad
inside of CAsmToLoad2?

public class CAsmToLoad
{
public string IOCTL(string strMsg)
{
return "hello world";
}
}

public class CAsmToLoad2
{
public string IOCTL(string strMsg)
{
return "error";
}
public class CAsmToLoad
{
public string IOCTL(string strMsg)
{
return "hello world - nested";
}
}
in the client assembly i itterate them like this currently:

protected string CallFunctionClassUnknown(string strNameSpace, string
strPath, string strMethod, string strInput, string strClass)
{
string strVal = "";
System.Reflection.Assembly SampleAssembly;
SampleAssembly = System.Reflection.Assembly.LoadFrom(strPath);
System.Type[] Types = SampleAssembly.GetTypes();
foreach (System.Type oType in Types)
{
if(oType.Name.ToString() == strClass)
{
System.Object pObj = SampleAssembly.CreateInstance(strNameSpace + "." +
oType.Name.ToString());
strVal = (oType.GetMethod(strMethod).Invoke(pObj, new object[] {
strInput } )).ToString();
}
}
return strVal;
}



Jul 21 '05 #1
0 1111

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

Similar topics

9
by: Zlatko Matić | last post by:
I was reading about late binding, but I'm not completely sure what is to be done in order to adjust code to late binding... For example, I'm not sure if this is correct: early binding: Dim ws...
132
by: Kevin Spencer | last post by:
About 2 years ago, and as recently as perhaps 1 year ago, I can recall seeing many posts about what language to use with ASP.Net. The consensus was that employers paid more for C# programmers, and...
30
by: lgbjr | last post by:
hi All, I've decided to use Options Strict ON in one of my apps and now I'm trying to fix a late binding issue. I have 5 integer arrays: dim IA1(500), IA2(500), IA3(500), IA4(500), IA5(500) as...
0
by: Daniel | last post by:
when loading this dll into an assembly via late binding how do i diferentiate between outer CAsmToLoad class and the inner class CAsmToLoad inside of CAsmToLoad2? public class CAsmToLoad {...
9
by: MariusI | last post by:
Consider the following class layout public class Order { public ProductOrder AddProductOrder(/* variables required to create a product order */) { /* Check if the product order can be added...
2
by: miked | last post by:
I am architecting in a read only class for use in mapping data to a business object. The object makes strong use of nested classes and their ability to access protected fields. The downside is...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
3
by: ChrisW | last post by:
Hiya, So I have a class that creates threads within it. These threads are a class underneath the parent class. I want to access values in the parent class from the threads while they run. Yet...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.