CSharp examples for System.Reflection:Assembly
Is Framework Assembly
// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information. using System.Text; using System.Reflection; using System.Linq; using System.Collections.Generic; using System;//from w ww.j a va2 s.c o m public class Main{ public static bool IsFrameworkAssembly(this Assembly assembly) { byte[] publicKeyToken = assembly.GetName().GetPublicKeyToken(); return publicKeyToken.Length > 0 && frameworkTokens.Any(t => t.SequenceEqual(publicKeyToken)); } }