我继承了一个VB.Net代码库,它是VB 2005并升级到VB 2008,包含大约100个项目
我正在尝试重新版本所有组件,但发现一些AssemblyInfo.vb文件有一个AssemblyFiLeversion条目,有些具有AssemblyFiLeversionAttribute条目.
此外,一些具有AssemblyVersion条目,一些具有AssemblyVersionAttribute条目.
有和没有属性有什么区别?
我应该使用哪些?
解决方法
没有区别.就像int将解析为system.int32一样,任何从Attribute派生的类型都由编译器专门处理.所以…
[MyCustom]将解析为[MyCustomAttribute]
By convention,all attribute names end with the word “Attribute” to distinguish them from other items in the .NET Framework. However,you do not need to specify the attribute suffix when using attributes in code. For example,[DllImport] is equivalent to [DllImportAttribute],but DllImportAttribute is the attribute’s actual name in the .NET Framework.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。