It doesn't give any compilation error. At runtime, it
throws exception - 'There was an error reflecting
type 'System.Reflection.MethodInfo'
-------------
XmlSerializer mySerializer = new XmlSerializer(typeof
(MethodInfo));
mySerializer.Serialize(myWriter, method);
//method is a object of class MethodInfo
----------
Oleg Tkachenko - 30 Oct 2003 11:54 GMT
> It doesn't give any compilation error. At runtime, it
> throws exception - 'There was an error reflecting
> type 'System.Reflection.MethodInfo'
It's by design. You cannot serialize class memebers that have
declarative security attributes. This is done to prevent breaking of the
declarative security.

Signature
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel