c# 预定义特性

[Serializable]  --序列化

[NonSerialized]  --声明结构不可以被序列化

 [DLLImport]   --声明是非托管代码实现的

[WebMethod]  --声明方法应该被作为xml web服务的一部分暴露

[AttributeUsage] --声明特性能应用到什么类型的程序结构.这个特性用到特性声明上

原文地址:https://www.cnblogs.com/lichuangblog/p/7899640.html