by Gehan Fernando. (13 Submissions)
Category: Miscellaneous
Compatability: VB.NET
Difficulty: Unknown Difficulty
Originally Published: Mon 17th September 2007
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Read Meta Data In Run Time Using Reflection
Dim m_AssInfo As System.Reflection.Assembly
m_AssInfo = System.Reflection.Assembly.GetExecutingAssembly()
Dim m_Title As Reflection.AssemblyTitleAttribute
Dim m_Description As Reflection.AssemblyDescriptionAttribute
Dim m_Company As Reflection.AssemblyCompanyAttribute
Dim m_Product As Reflection.AssemblyProductAttribute
Dim m_CopyRight As Reflection.AssemblyCopyrightAttribute
Dim m_Trademark As Reflection.AssemblyTrademarkAttribute
Dim m_Version As Reflection.AssemblyFileVersionAttribute
m_Title = m_AssInfo.GetCustomAttributes(GetType(Reflection.AssemblyTitleAttribute), False)(0)
m_Description = m_AssInfo.GetCustomAttributes(GetType(Reflection.AssemblyDescriptionAttribute), False)(0)
m_Company = m_AssInfo.GetCustomAttributes(GetType(Reflection.AssemblyCompanyAttribute), False)(0)
m_Product = m_AssInfo.GetCustomAttributes(GetType(Reflection.AssemblyProductAttribute), False)(0)
m_CopyRight = m_AssInfo.GetCustomAttributes(GetType(Reflection.AssemblyCopyrightAttribute), False)(0)
m_Trademark = m_AssInfo.GetCustomAttributes(GetType(Reflection.AssemblyTrademarkAttribute), False)(0)
m_Version = m_AssInfo.GetCustomAttributes(GetType(Reflection.AssemblyFileVersionAttribute), False)(0)
Console.WriteLine("Title :- " & m_Title.Title.ToString())
Console.WriteLine("Description :- " & m_Description.Description.ToString())
Console.WriteLine("Compnay :- " & m_Company.Company.ToString())
Console.WriteLine("Product :- " & m_Product.Product.ToString())
Console.WriteLine("Copyright :- " & m_CopyRight.Copyright.ToString())
Console.WriteLine("Trademark :- " & m_Trademark.Trademark.ToString())
Console.WriteLine("Version :- " & m_Version.Version.ToString())
Console.Read()
End Sub