7 February 2014

Get assembly version and name using C#.NET

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        GetAssemblyVerName();
    }
    private void GetAssemblyVerName()
    {
        Response.Write("Assembly version    :" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() + "<br>");
        Response.Write("Assembly Name       :" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Name.ToString());
    }
}

No comments:

Post a Comment