Get Name Of Current Executing Assembly In C#
This is where reflection comes in handy. The following code snippet shows you how to get the name of executing assembly.
string assemblyName; assemblyName = System.Reflection.Assembly.GetExecutingAssembly().FullName; Console.WriteLine(assemblyName);
Output for the above code returns the fully qualified name as shown below
To just get the Assembly name we can use this snippet.
string assemblyName; assemblyName = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name; Console.WriteLine(assemblyName);
Here is the output.
![]()
Top Posts
- LINQ To SQL Tutorial
- LINQ To SQL Join On Multiple Conditions
- Code Sample: Programmatically Download File Using C#
- Windows 7 Control Panel In Classic Mode
- More Details Emerge On Microsoft Master Certification
- Use SqlConnection With LINQ To SQL
- Free Icons And Images With Visual Studio 2008
- Capture XML In WCF Service
- Dynamic Sort With LINQ
- StyleCop Tutorial
Tags
.Net 2010 ADO.NET ASP.NET Azure Blogging Books Browsers C# Certification Cloud Computing Code Snippets Community Data Services Eclipse Entity Framework Google IDE Java LINQ Mac Microsoft Museum NetBeans Office Oracle REST SharePoint Silverlight SQL Server T-SQL Tips Tools Training Visual Studio Visual Studio 2010 WCF Web Windows Windows 7 Windows Forms Windows Live WMI WPF XAML

