Essential C# AsseblyInfo.cs examples  Suggest an edit

Reading Assembly Attributes

Using .NET’s rich reflection APIs, you can gain access to an assembly’s metadata. For example, you can get this assembly’s title attribute with the following code

using System.Linq;
using System.Reflection;

...

Assembly assembly = typeof(this).Assembly;
var titleAttribute = assembly.GetCustomAttributes<AssemblyTitleAttribute>().FirstOrDefault();

Console.WriteLine($"This assembly title is {titleAttribute?.Title}");

Table Of Contents
22 Enum
25 GUID
107 Stream
108 Timers
140 AsseblyInfo.cs examples
  ↑ ↓ to navigate     ↵ to select     Esc to close