CSharp examples for System.Reflection:Assembly
Returns the assembly where the current type is defined
// Copyright (c) Costin Morariu. All rights reserved. using System.Reflection; using System.Collections.Generic; using System;/*from ww w. j av a2s.co m*/ public class Main{ /// <summary> /// Returns the assembly where the current type is defined /// </summary> /// <param name="type">Current type</param> /// <returns>The assembly in wich the type is defined</returns> public static Assembly GetAssembly(this Type type) { return type.GetTypeInfo().Assembly; } }