自定义装配体属性
我想知道是否可以定义自定义程序集属性。现有属性按以下方式定义:
[assembly: AssemblyTitle("MyApplication")]
[assembly: AssemblyDescription("This application is a sample application.")]
[assembly: AssemblyCopyright("Copyright © MyCompany 2009")]
有没有办法我可以执行以下操作:
[assembly: MyCustomAssemblyAttribute("Hello World! This is a custom attribute.")]
I would like to know if I can define custom assembly attributes. Existing attributes are defined in the following way:
[assembly: AssemblyTitle("MyApplication")]
[assembly: AssemblyDescription("This application is a sample application.")]
[assembly: AssemblyCopyright("Copyright © MyCompany 2009")]
Is there a way I can do the following:
[assembly: MyCustomAssemblyAttribute("Hello World! This is a custom attribute.")]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,你可以。我们做这种事。
要阅读,请使用这种 linq stmt。
Yes you can. We do this kind of thing.
To read use this kind of linq stmt.
是的,使用 AttributeTargets.Assembly:
Yes, use AttributeTargets.Assembly: