Get .Net version number in c#
How do I get what is the .Net version number my app is currently running on using c#?
Asked on: Feb 02, 2012 at 12:18AM
You can try this code
Assembly asbly = Assembly . Load ( "App_Code" ); AssemblyName assemblyname = asbly . GetName (); string Version = assemblyname . Version . ToString ();
if its a website project use
Assembly asbly = Assembly . GetExecutingAssembly (); AssemblyName assemblyname = asbly . GetName (); string Version = assemblyname . Version . ToString ();
and dont forget to add the namespace
using System . Reflection ;
in your page
edit | flag
Answered on: Feb 02, 2012 at 12:26AM
Post your Answer
Welcome to Ask Amoeba! This is 100% free and interactive site for sharing professional Questions and Answers, Opensource projects, Interview questions. Learners, beginners, Experts stop and share your knowledge and ideas!