O
Oleg Ogurok
Hi all,
According to this document, the auto-generated revision number for an
assembly is the number of seconds since midnight divided by 2. I'm testing
this with my code but the revision comes out 60 minutes ahead.
http://msdn.microsoft.com/library/d...lectionassemblyversionattributeclasstopic.asp
Here's the code:
DateTime now = DateTime.Now;
DateTime jan2000 = new DateTime(2000, 1, 1);
int build = (int)now.Subtract(jan2000).TotalDays;
int revision = (int)now.Subtract(DateTime.Today).TotalSeconds / 2;
textBox1.Text += "assembly version: " +
Assembly.GetExecutingAssembly().GetName().Version.ToString() +
Environment.NewLine;
textBox1.Text += "Build: " + build + Environment.NewLine;
textBox1.Text += "Rev: " + revision + Environment.NewLine;
Here's the output:
assembly version: 1.0.1731.23390
Build: 1731
Rev: 25192
Any ideas on how to properly calculate the Revision number?
Thanks,
-Oleg.
According to this document, the auto-generated revision number for an
assembly is the number of seconds since midnight divided by 2. I'm testing
this with my code but the revision comes out 60 minutes ahead.
http://msdn.microsoft.com/library/d...lectionassemblyversionattributeclasstopic.asp
Here's the code:
DateTime now = DateTime.Now;
DateTime jan2000 = new DateTime(2000, 1, 1);
int build = (int)now.Subtract(jan2000).TotalDays;
int revision = (int)now.Subtract(DateTime.Today).TotalSeconds / 2;
textBox1.Text += "assembly version: " +
Assembly.GetExecutingAssembly().GetName().Version.ToString() +
Environment.NewLine;
textBox1.Text += "Build: " + build + Environment.NewLine;
textBox1.Text += "Rev: " + revision + Environment.NewLine;
Here's the output:
assembly version: 1.0.1731.23390
Build: 1731
Rev: 25192
Any ideas on how to properly calculate the Revision number?
Thanks,
-Oleg.