G
Guest
Hi i had 1 question.
I had 2 ways to doing this, but i not sure which is the best way. My colleague ask me this and i had no idea why i choose either one of these.
I want to get version number of a library. Just ignore AssemblyInfo for a while, as i need to set version of each class within the library.
1st way:
by custom attributes
Example
[VersionAttribute("1.0.0.1")]
public class Animal
{
}
or
2nd way:
private string versionNumber = "1.0.0.1";
public string VersionNumber
{
get
{
return versionNumber;
}
}
Please help. Thanks. I just need a confirmation, well i would prefer attributes as it is easy.
I had 2 ways to doing this, but i not sure which is the best way. My colleague ask me this and i had no idea why i choose either one of these.
I want to get version number of a library. Just ignore AssemblyInfo for a while, as i need to set version of each class within the library.
1st way:
by custom attributes
Example
[VersionAttribute("1.0.0.1")]
public class Animal
{
}
or
2nd way:
private string versionNumber = "1.0.0.1";
public string VersionNumber
{
get
{
return versionNumber;
}
}
Please help. Thanks. I just need a confirmation, well i would prefer attributes as it is easy.