Hi,

You can tag your assembly with a custom attribute and extract it at
runtime (provided you have the necessary permissions at runtime).
I wouldn't call C#'s preprocessor a preprocessor. It is... well, it
SUCKS big time.

HTH & cheers,

Stoyan
http://spaces.msn.com/members/stoyan/

-----Original Message-----
From: Unmoderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Raj Malli
Sent: Tuesday, January 25, 2005 4:31 AM
To: [email protected]
Subject: [ADVANCED-DOTNET] Determing time when a assembly was built


Hi guys

Is there a way by which I can programmatically determine the build time
of an assembly? I would like to show the following information in the
"About" box of my application: Application Name, Version and Build Time.

I do not want to do the following:
  - Use the last two parts of the assembly version to encode the time
  - Get the last modified time from the assembly file using (say) the
    FileInfo class

In C/C++, this is how I'd have done this:
  #define BUILD_TIME __TIME__
  void OnAbout() {
     ...
     MessageBox(BUILD_TIME);
     ...
  }
I know C# supports a preprocessor. Can I do something similar to the
above in C#? Otherwise what other options do I have?

Thanks
Raj

===================================
This list is hosted by DevelopMentorR  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentor�  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to