gpt4 book ai didi

VB.Net - AssemblyFileVersion & AssemblyFileVersionAttribute 和 AssemblyVersion & AssemblyVersionAttribute 之间有什么区别

转载 作者:行者123 更新时间:2023-12-04 22:37:34 24 4
gpt4 key购买 nike

我继承了一个 VB.Net 代码库,它是 VB 2005 并升级到 VB 2008,包含大约 100 个项目

我正在尝试重新版本所有组件,但发现某些 AssemblyInfo.vb 文件具有 AssemblyFileVersion条目和一些有 AssemblyFileVersionAttribute入口。

此外,有些人有 AssemblyVersion条目和一些有 AssemblyVersionAttribute入口。

有和没有有什么区别Attribute ?

我应该使用哪些?

最佳答案

没有区别。正如 int将解析为 System.Int32 , 派生自 Attribute 的任何类型由编译器特别处理。所以...
[MyCustom]将解析为 [MyCustomAttribute]
Relavent MSDN Entry

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.

关于VB.Net - AssemblyFileVersion & AssemblyFileVersionAttribute 和 AssemblyVersion & AssemblyVersionAttribute 之间有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3109848/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com