在 C# 程序集版本中使用前导零是否合适? [英] Is it appropriate to use leading zero in C# assembly version?
问题描述
我正在为我的 dot net dll 设置程序集版本
I am setting assembly version for my dot net dll
Assmebly 版本有以下格式,
Assmebly version has below format,
主要版本.次要版本.内部版本号.修订版"
我正在如下设置 Verison,
I am setting Verison like below,
200.1.1.0;
现在我的问题是,我是否需要在次要版本、内部版本号和修订号(200.01.01.00)
中保留前导零,或者不保留前导零 (200.1.1.0).
哪个是正确的做法?是否有任何 Microsoft 指南可用?我没有通过谷歌搜索找到任何指南.
Now my question is do I need to keep a leading zero in minor version,build number and revision number (200.01.01.00)
Or without leading zero (200.1.1.0).
Which is right practice? Is there any Microsoft guideline available ? I didn't find any guidelines by Googling.
推荐答案
版本在内部存储为整数,因此即使您在版本号的开头附加 0,它也会被转换为 int 并删除.
The versions are stored internally as integers, so even if you append 0 to the start of the version number, it will be converted to an int and removed.
这篇关于在 C# 程序集版本中使用前导零是否合适?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!