信息交流、传播、提炼

nice to meet you

博客园 首页 新随笔 联系 订阅 管理
只要给CodeTypeDeclaration对象添加一个CustomAttributes属性即可:
 
co.CustomAttributes.Add(new CodeAttributeDeclaration("Serializable"));


这样就可以在生成类前面加上"[Serializable()]",

posted on 2007-09-18 12:27  seeyou  阅读(171)  评论(0)    收藏  举报