Exemple d’utilisation de ‘ReflectionOnlyGetAssemblies’

Author:

Charger,une,Assemblée,avec,un,nom
{filelink=17575}

using System;
using System.Reflection;
using System.Timers;

public class Example
{
    public static void Main()
    {
        string nom = typeof(Timer).Assembly.FullName;
        Assembly.ReflectionOnlyLoad(nom);
        foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies())
        {
            Console.WriteLine("	{0}", a.GetName());
        }
        foreach (Assembly a in AppDomain.CurrentDomain.ReflectionOnlyGetAssemblies())
        {
            Console.WriteLine("	{0}", a.GetName());
        }
    }
}

Leave a Reply

Your email address will not be published. Required fields are marked *