Thats not really an option. I do this right now, enforcing the class to be abstract and generating a subclass - thats what I want to get rid of :-)
Thomas Tomiczek THONA Consulting Ltd. (Microsoft MVP C#/.NET) -----Original Message----- From: Jason Whittington [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 16. Oktober 2002 22:16 To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Possible to change type definition when the type is loaded? > Simple problem - sort of. I have a toolkit that needs to change type > definitions when the type is loaded. > > Is there any interface where I could "go in between" to change the class > bytecode (for certain methods) while the class is being loaded? In a way > that still goes through the verifier? I'm not aware of a way to do it at classload time but you can hook the IL at JIT time and doctor it up using the profiling interfaces. This is how Jon Lam's CLAW works. Have you thought about dynamically generating classes with System.Reflection.Emit or similar? This might allow you to do some of what you want. Jason You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.