Show / Hide Table of Contents

    Class Assembly

    Represents an assembly, which is a reusable, versionable, and self-describing building block of a common language runtime application.

    Inheritance
    Object
    Assembly
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: System.Reflection
    Assembly: mscorlib.dll
    Syntax
    public class Assembly

    Properties

    FullName

    Gets the display name of the assembly.

    Declaration
    public virtual string FullName { get; }
    Property Value
    Type Description
    String

    The display name of the assembly.

    Methods

    | Improve this Doc View Source

    GetAssembly(Type)

    Gets the currently loaded assembly in which the specified type is defined.

    Declaration
    public static Assembly GetAssembly(Type type)
    Parameters
    Type Name Description
    Type type

    An object representing a type in the assembly that will be returned.

    Returns
    Type Description
    Assembly

    The assembly in which the specified type is defined.

    GetExecutingAssembly()

    Gets the assembly that contains the code that is currently executing.

    Declaration
    public static extern Assembly GetExecutingAssembly()
    Returns
    Type Description
    Assembly

    The assembly that contains the code that is currently executing.

    | Improve this Doc View Source

    GetName()

    Gets an AssemblyName for this assembly.

    Declaration
    public AssemblyName GetName()
    Returns
    Type Description
    AssemblyName

    An object that contains the fully parsed display name for this assembly.

    | Improve this Doc View Source

    GetSatelliteAssembly(CultureInfo)

    Gets the satellite assembly for the specified culture.

    Declaration
    public Assembly GetSatelliteAssembly(CultureInfo culture)
    Parameters
    Type Name Description
    CultureInfo culture

    The specified culture.

    Returns
    Type Description
    Assembly

    The specified satellite assembly.

    Exceptions
    Type Condition
    ArgumentNullException

    culture is null.

    ArgumentException

    GetType(String)

    Gets the Type object with the specified name in the assembly instance.

    Declaration
    public extern virtual Type GetType(string name)
    Parameters
    Type Name Description
    String name

    The full name of the type.

    Returns
    Type Description
    Type

    An object that represents the specified class, or null if the class is not found.

    | Improve this Doc View Source

    GetType(String, Boolean)

    Gets the Type object with the specified name in the assembly instance and optionally throws an exception if the type is not found.

    Declaration
    public virtual Type GetType(string name, bool throwOnError)
    Parameters
    Type Name Description
    String name

    The full name of the type.

    Boolean throwOnError

    true to throw an exception if the type is not found; false to return null.

    Returns
    Type Description
    Type

    An object that represents the specified class.

    Exceptions
    Type Condition
    ArgumentException

    GetTypes()

    Gets the types defined in this assembly.

    Declaration
    public extern virtual Type[] GetTypes()
    Returns
    Type Description
    Type[]

    An array that contains all the types that are defined in this assembly.

    Load(Byte[])

    Loads the assembly with a common object file format (COFF)-based image containing an emitted assembly. The assembly is loaded into the application domain of the caller.

    Declaration
    public static extern Assembly Load(byte[] rawAssembly)
    Parameters
    Type Name Description
    Byte[] rawAssembly

    A byte array that is a COFF-based image containing an emitted assembly.

    Returns
    Type Description
    Assembly

    The loaded assembly.

    Exceptions
    Type Condition
    ArgumentException

    rawAssembly is not a valid assembly.

    | Improve this Doc View Source

    Load(String)

    Loads an assembly given the long form of its name.

    Declaration
    public static Assembly Load(string assemblyString)
    Parameters
    Type Name Description
    String assemblyString

    The long form of the assembly name.

    Returns
    Type Description
    Assembly

    The loaded assembly.

    Exceptions
    Type Condition
    ArgumentNullException

    assemblyString is null.

    Extension Methods

    LogDispatcher.GetCurrentClassLogger(Object)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018 nanoFramework Contributors
    Generated by DocFX