1
Answer

Creating a dynamic C# class

shantanu

shantanu

17y
2.4k
1
Hi...  I have following requirement:

Suppose there are 2 classe:

Class A
{
public void method1()
{
}

public void method2()
{
}

}


Class B
{
public void method3()
{
}

public void method4()
{
}

}



Now I want to create another class C having all the methods of Class A & Class B. Assume that there are no member fields in A & B & no two methods have same name.  Can class C be generated Inmemory ?  
Actually I will have info regarding Classes A, B etc in an XML & need to combine them into a single class so that all the methods can be accessed by a common prefix, i.e., like C.Method1() ...

Any help will be appreciated !

Answers (1)
Next Recommended Forum