C#:如何检查实例是否可序列化

Ric*_*cky 1 c# asp.net

如何检查实例是否标记为可序列化?

谢谢

Che*_*hen 5

typeof(MyClass).IsSerializable;
Run Code Online (Sandbox Code Playgroud)