Re: _TIMESTAMP_ and __TIME__ equivalent in C#
- From: "Ben Voigt [C++ MVP]" <rbv@xxxxxxxxxxxxx>
- Date: Wed, 6 Feb 2008 17:09:59 -0600
Ben Voigt [C++ MVP] wrote:
Eitan wrote:
Hello,
I would like to display a timestamp of when the application was
compiled. In C++ I used the _TIMESTAMP_ and __TIME__ etc.
Do we have anything equivalent in C# and .NET?
[assembly: AssemblyVersion("1.1.*")]
When specifying a version, you have to at least specify major. If you
specify major and minor, you can specify an asterisk (*) for build.
This will cause build to be equal to the number of days since January
1, 2000 local time, and for revision to be equal to the number of
seconds since midnight local time, divided by 2.
BTW, it's a little confusing to find the version at runtime, you need
Assembly.GetName().Version
Thanks,
EitanB
.
- Follow-Ups:
- Re: _TIMESTAMP_ and __TIME__ equivalent in C#
- From: Nicholas Paldino [.NET/C# MVP]
- Re: _TIMESTAMP_ and __TIME__ equivalent in C#
- References:
- Re: _TIMESTAMP_ and __TIME__ equivalent in C#
- From: Ben Voigt [C++ MVP]
- Re: _TIMESTAMP_ and __TIME__ equivalent in C#
- Prev by Date: Re: Invisible App Run
- Next by Date: Re: Function minimization and random numbers
- Previous by thread: Re: _TIMESTAMP_ and __TIME__ equivalent in C#
- Next by thread: Re: _TIMESTAMP_ and __TIME__ equivalent in C#
- Index(es):
Relevant Pages
|