M
manohar.shankar
Hi,
I have been searching on this topic for quite sometime and didnt get
any answer.
Is there a way I can extend/add methods/properties to a C# class during
runtime.
eg.,
I have class:
public class MyClass {
private string identity;
}
So when running the program using this class I want to add a attribute
called "name" of type "string". Or say I want to make this class extend
some other class in runtime. Or add method called getIdentity() in
runtime.
Is any of the above possible? Or is it too much to ask?
To give you some background as to why I need this. We are using wsdl
tool to generate client proxy classes using .wsdl file. We need to add
some extra re-wiring to the classes generated in addition to the
relationships already in the schema which was part of wsdl file.
Or is it possible to override wsdl generation and catch the events
generated to add additional code during generation.
Any suggestion/documentation pointing to these aspects will be very
helpful.
Thanks in advance for all the help!!
I have been searching on this topic for quite sometime and didnt get
any answer.
Is there a way I can extend/add methods/properties to a C# class during
runtime.
eg.,
I have class:
public class MyClass {
private string identity;
}
So when running the program using this class I want to add a attribute
called "name" of type "string". Or say I want to make this class extend
some other class in runtime. Or add method called getIdentity() in
runtime.
Is any of the above possible? Or is it too much to ask?
To give you some background as to why I need this. We are using wsdl
tool to generate client proxy classes using .wsdl file. We need to add
some extra re-wiring to the classes generated in addition to the
relationships already in the schema which was part of wsdl file.
Or is it possible to override wsdl generation and catch the events
generated to add additional code during generation.
Any suggestion/documentation pointing to these aspects will be very
helpful.
Thanks in advance for all the help!!