CSharp examples for System.Reflection:Assembly
Get Assembly Version
// The MIT License using System.Runtime.InteropServices; using System.Reflection; using System.Linq; using System;/* ww w. j a v a 2 s .com*/ public class Main{ public static string GetAssemblyVersion(this Assembly assembly) { var query = from versions in assembly.GetCustomAttributes<AssemblyVersionAttribute>() select versions; if(1 == query.Count()) { return query.First().Version; } return ""; } }