How to

find out whether class is from startup assembly

Published: 2. November 2011 | Updated: 2. November 2011
License: Microsoft Public License (MS-PL)
Categories: Framework » Reflection
Tags: C# Reflection
Was this snippet helpful for you? YESYES / NONO

Import namespace

using System.Reflection;

Code

public static bool IsFromStartupAssembly(Type type)
{
    return Assembly.GetEntryAssembly() == type.Assembly;
}
Send us feedback about this snippet »



Related Snippets: