Informations
Le sujet que vous avez demandé est indiqué ci-dessous. Toutefois, ce sujet ne figure pas dans la bibliothèque.
Ce sujet n'a pas encore été évalué - Évaluez ce sujet

ReflectionPermission, classe

Contrôle l'accès aux métadonnées par l'intermédiaire des interfaces API System.Reflection. Cette classe ne peut pas être héritée.

Espace de noms : System.Security.Permissions
Assembly : mscorlib (dans mscorlib.dll)

[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public sealed class ReflectionPermission : CodeAccessPermission, IUnrestrictedPermission
/** @attribute SerializableAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
public final class ReflectionPermission extends CodeAccessPermission implements IUnrestrictedPermission
SerializableAttribute 
ComVisibleAttribute(true) 
public final class ReflectionPermission extends CodeAccessPermission implements IUnrestrictedPermission

Type est la racine de la fonctionnalité System.Reflection. Sans ReflectionPermission, le code ne peut accéder qu'aux membres public des assemblys chargés. Ceci comprend notamment l'accès sans restriction à Object.GetType, l'accès aux types exportés public par l'intermédiaire de Type.GetType et l'accès à GetTypeFromHandle. Certaines propriétés du Type, telles que FullName et Attributes, sont accessibles sans ReflectionPermission.

Le code avec la ReflectionPermission appropriée a accès aux membres public, protected et même private de tout Type chargé. Ceci inclut l'accès à Module, Assembly, BaseType et GetInterfaces.

AttentionAttention

Étant donné que ReflectionPermission peut permettre d'accéder aux membres de classes privées et aux métadonnées, il est recommandé de ne pas accorder de ReflectionPermission au code Internet.

using System;
using System.Security;
using System.Security.Permissions;

[assembly: CLSCompliant(true)]

public class ReflectionPermissionDemo
{
    // IsSubsetOf determines whether the current permission is a subset of the specified permission.
    private bool IsSubsetOfDemo()
    {
        bool returnValue = true;
        ReflectionPermissionFlag reflection1, reflection2;
        ReflectionPermission reflectionPerm1, reflectionPerm2;
        ReflectionGenerator reflectionGen1 = new ReflectionGenerator();
        ReflectionGenerator reflectionGen2 = new ReflectionGenerator();
        reflectionGen1.ResetIndex();
        while (reflectionGen1.CreateReflection(out reflection1))
        {
            reflectionPerm1 = new ReflectionPermission(reflection1);
            reflectionGen2.ResetIndex();
            Console.WriteLine("********************************************************\n");

            while (reflectionGen2.CreateReflection(out reflection2))
            {
                reflectionPerm2 = new ReflectionPermission(reflection2);
                try
                {
                    if (reflectionPerm1.IsSubsetOf(reflectionPerm2))
                    {
                        Console.WriteLine(reflectionPerm1.Flags + " is a subset of " +
                            reflectionPerm2.Flags);
                    }
                    else
                    {
                        Console.WriteLine(reflectionPerm1.Flags + " is not a subset of " +
                            reflectionPerm2.Flags);
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine("An exception was thrown for subset :" + reflectionPerm1 + "\n" +
                        reflectionPerm2 + "\n" + e);
                    returnValue = false;
                }
            }
        }
        return returnValue;
    }
    // Union creates a new permission that is the union of the current permission and the specified permission.
    private bool UnionDemo()
    {
        bool returnValue = true;
        ReflectionPermissionFlag reflection1, reflection2;
        ReflectionPermission reflectionPerm1, reflectionPerm2;
        IPermission reflectionPerm3;
        ReflectionGenerator reflectionGen1 = new ReflectionGenerator();
        ReflectionGenerator reflectionGen2 = new ReflectionGenerator();
        reflectionGen1.ResetIndex();
        while (reflectionGen1.CreateReflection(out reflection1))
        {
            reflectionPerm1 = new ReflectionPermission(reflection1);
            Console.WriteLine("**********************************************************\n");
            reflectionGen2.ResetIndex();

            while (reflectionGen2.CreateReflection(out reflection2))
            {
                reflectionPerm2 = new ReflectionPermission(reflection2);
                reflectionPerm3 = (ReflectionPermission)reflectionPerm1.Union(reflectionPerm2);
                reflectionPerm3 = reflectionPerm1.Union(reflectionPerm2);

                if (reflectionPerm3 == null)
                {
                    Console.WriteLine("The union of " + reflection1 + " and " + reflection2 + " is null.");
                }
                else
                {
                    Console.WriteLine("The union of " + reflectionPerm1.Flags + " and " +
                        reflectionPerm2.Flags + " = " +
                        ((ReflectionPermission)reflectionPerm3).Flags.ToString());
                }

            }
        }

        return returnValue;

    }
    // Intersect creates and returns a new permission that is the intersection of the current
    // permission and the permission specified.
    private bool IntersectDemo()
    {
        bool returnValue = true;
        ReflectionPermissionFlag reflection1, reflection2;
        ReflectionPermission reflectionPerm1, reflectionPerm2, reflectionPerm3;
        ReflectionGenerator reflectionGen1 = new ReflectionGenerator();
        ReflectionGenerator reflectionGen2 = new ReflectionGenerator();
        reflectionGen1.ResetIndex();
        while (reflectionGen1.CreateReflection(out reflection1))
        {
            reflectionPerm1 = new ReflectionPermission(reflection1);
            Console.WriteLine("**********************************************************\n");
            reflectionGen2.ResetIndex();

            while (reflectionGen2.CreateReflection(out reflection2))
            {
                reflectionPerm2 = new ReflectionPermission(reflection2);

                reflectionPerm3 = (ReflectionPermission)reflectionPerm1.Intersect(reflectionPerm2);
                if (reflectionPerm3 != null)
                {
                    Console.WriteLine("The intersection of " + reflection1 + " and " + reflection2 + " = " +
                        ((ReflectionPermission)reflectionPerm3).Flags.ToString());
                }
                else
                {
                    Console.WriteLine("The intersection of " + reflection1 + " and " + reflection2 + " is null.");
                }
            }
        }

        return returnValue;
    }
    //Copy creates and returns an identical copy of the current permission.
    private bool CopyDemo()
    {

        bool returnValue = true;

        ReflectionPermissionFlag reflection1;
        ReflectionPermission reflectionPerm1, reflectionPerm2;

        ReflectionGenerator reflectionGen1 = new ReflectionGenerator();
        ReflectionGenerator reflectionGen2 = new ReflectionGenerator();

        reflectionGen1.ResetIndex();
        while (reflectionGen1.CreateReflection(out reflection1))
        {
            reflectionPerm1 = new ReflectionPermission(reflection1);
            reflectionGen2.ResetIndex();
            Console.WriteLine("********************************************************\n");
            try
            {
                reflectionPerm2 = (ReflectionPermission)reflectionPerm1.Copy();
                Console.WriteLine("Result of copy = " + reflectionPerm2.ToString());

            }
            catch (Exception e)
            {
                Console.WriteLine("Copy failed :" + reflectionPerm1.ToString() + e);
                continue;
            }
        }
        return returnValue;
    }
    // ToXml creates an XML encoding of the permission and its current state;
    // FromXml reconstructs a permission with the specified state from the XML encoding.
    private bool ToFromXmlDemo()
    {

        bool returnValue = true;

        ReflectionPermissionFlag reflection1;
        ReflectionPermission reflectionPerm1, reflectionPerm2;
        ReflectionGenerator reflectionGen1 = new ReflectionGenerator();
        ReflectionGenerator reflectionGen2 = new ReflectionGenerator();
        reflectionGen1.ResetIndex();
        while (reflectionGen1.CreateReflection(out reflection1))
        {
            reflectionPerm1 = new ReflectionPermission(reflection1);
            Console.WriteLine("********************************************************\n");
            reflectionGen2.ResetIndex();
            try
            {
                reflectionPerm2 = new ReflectionPermission(PermissionState.None);
                reflectionPerm2.FromXml(reflectionPerm1.ToXml());
                Console.WriteLine("Result of ToFromXml = " +
                    reflectionPerm2.ToString());

            }
            catch (Exception e)
            {
                Console.WriteLine("ToFromXml failed :" + reflectionPerm1.ToString() + e);
                continue;
            }
        }

        return returnValue;

    }
    // Invoke all demos.
    public bool runDemo()
    {
        bool returnCode = true;
        bool tempReturnCode;

        // Call the IsSubsetOf demo.
        if (tempReturnCode = IsSubsetOfDemo()) Console.Out.WriteLine("IsSubsetOf demo completed successfully.");
        else Console.Out.WriteLine("IsSubsetOf demo failed.");
        returnCode = tempReturnCode && returnCode;

        // Call the Union demo.
        if (tempReturnCode = UnionDemo()) Console.Out.WriteLine("Union demo completed successfully.");
        else Console.Out.WriteLine("Union demo failed.");
        returnCode = tempReturnCode && returnCode;

        // Call the Intersect demo.
        if (tempReturnCode = IntersectDemo()) Console.Out.WriteLine("Intersect demo completed successfully.");
        else Console.Out.WriteLine("Intersect demo failed.");
        returnCode = tempReturnCode && returnCode;


        // Call the Copy demo.
        if (tempReturnCode = CopyDemo()) Console.Out.WriteLine("Copy demo completed successfully.");
        else Console.Out.WriteLine("Copy demo failed.");
        returnCode = tempReturnCode && returnCode;

        // Call the ToFromXml demo.
        if (tempReturnCode = ToFromXmlDemo()) Console.Out.WriteLine("ToFromXml demo completed successfully.");
        else Console.Out.WriteLine("ToFromXml demo failed.");
        returnCode = tempReturnCode && returnCode;

        return (returnCode);
    }
    // Test harness.
    public static void Main(String[] args)
    {
        try
        {
            ReflectionPermissionDemo democase = new ReflectionPermissionDemo();
            bool returnCode = democase.runDemo();
            if (returnCode)
            {
                Console.Out.WriteLine("ReflectionPermission demo completed successfully.");
                Console.Out.WriteLine("Press the Enter key to exit.");
                string consoleInput = Console.ReadLine();
                System.Environment.ExitCode = 100;
            }
            else
            {
                Console.Out.WriteLine("ReflectionPermission demo failed.");
                Console.Out.WriteLine("Press the Enter key to exit.");
                string consoleInput = Console.ReadLine();
                System.Environment.ExitCode = 101;
            }
        }
        catch (Exception e)
        {
            Console.Out.WriteLine("ReflectionPermission demo failed.");
            Console.WriteLine(e.ToString());
            Console.Out.WriteLine("Press the Enter key to exit.");
            string consoleInput = Console.ReadLine();
            System.Environment.ExitCode = 101;
        }
    }
}


// This class generates ReflectionPermission objects.

internal class ReflectionGenerator
{


    private ReflectionPermissionFlag[] myReflection =
{
    ReflectionPermissionFlag.AllFlags,
    ReflectionPermissionFlag.MemberAccess,
    ReflectionPermissionFlag.NoFlags,
    ReflectionPermissionFlag.ReflectionEmit,
    ReflectionPermissionFlag.TypeInformation};

    private int reflectionIndex = 0;

    public ReflectionGenerator()
    {
        ResetIndex();
    }

    public void ResetIndex()
    {
        reflectionIndex = 0;
    }
    // CreateReflection creates a ReflectionPermission object.
    public bool CreateReflection(out ReflectionPermissionFlag reflection)
    {

        if (reflectionIndex >= myReflection.Length)
        {

            reflection = ReflectionPermissionFlag.NoFlags;
            reflectionIndex++;
            return false;
        }
        reflection = myReflection[reflectionIndex++];
        return true;
    }
}

import System.*;
import System.Security.*;
import System.Security.Permissions.*;

/** @assembly CLSCompliant(true)
 */

public class ReflectionPermissionDemo
{
    // IsSubsetOf determines whether the current permission is a 
    // subset of the specified permission.
    private boolean IsSubsetOfDemo() 
    {
        boolean returnValue = true;
        ReflectionPermissionFlag reflection1[] = 
            new ReflectionPermissionFlag[1] ;
        ReflectionPermissionFlag reflection2[] = 
            new ReflectionPermissionFlag[1] ;
        ReflectionPermission reflectionPerm1[] = 
            new ReflectionPermission[1] ;
        ReflectionPermission reflectionPerm2[] = 
            new ReflectionPermission[1];
        ReflectionGenerator reflectionGen1 =  
            new ReflectionGenerator();
        ReflectionGenerator reflectionGen2 =  
            new ReflectionGenerator();
        reflectionGen1.ResetIndex();
        while(reflectionGen1.CreateReflection(reflectionPerm1, reflection1)) {
            if (reflectionPerm1[0] == null) {
                continue ;
            }
            reflectionGen2.ResetIndex();
            Console.WriteLine("***************************************" 
                + "*****************\n");
            
            while(reflectionGen2.CreateReflection(
                reflectionPerm2, reflection2)) {
                if (reflectionPerm2[0] == null) {
                    continue ;
                }
                try {
                    if ( reflectionPerm1[0].IsSubsetOf(reflectionPerm2[0])) {
                        Console.WriteLine((reflectionPerm1[0].get_Flags() 
                            + " is a subset of " + 
                        reflectionPerm2[0].get_Flags()));
                    }
                    else {
                        Console.WriteLine((reflectionPerm1[0].get_Flags() 
                            + " is not a subset of " 
                            + reflectionPerm2[0].get_Flags()));
                    }
                }
                catch(System.Exception e) {
                    Console.WriteLine(("An exception was " 
                        + "thrown for subset :" + reflectionPerm1[0] + "\n" 
                        + reflectionPerm2[0] + "\n" + e));
                    returnValue = false;
                }
            }
        }
        return returnValue ;
    } //IsSubsetOfDemo

    // Union creates a new permission that is the union of the 
    // current permission and the specified permission.
    private boolean UnionDemo() 
    {
        boolean returnValue = true;
        ReflectionPermissionFlag reflection1[] = 
            new ReflectionPermissionFlag[1];
        ReflectionPermissionFlag reflection2[] = 
            new ReflectionPermissionFlag[1];
        ReflectionPermission reflectionPerm1[] = 
            new ReflectionPermission[1];
        ReflectionPermission reflectionPerm2[] = 
            new ReflectionPermission[1];
        IPermission reflectionPerm3;
        ReflectionGenerator reflectionGen1 =  
            new ReflectionGenerator();
        ReflectionGenerator reflectionGen2 =  
            new ReflectionGenerator();
        reflectionGen1.ResetIndex();
        while(reflectionGen1.CreateReflection(reflectionPerm1, reflection1)) {
            if (reflectionPerm1[0] == null) {
                continue ;
            }
            Console.WriteLine("*******************************************" 
                + "***************\n");
            reflectionGen2.ResetIndex();
            
            while(reflectionGen2.CreateReflection(reflectionPerm2, 
                reflection2)) {
                if (reflectionPerm2[0] == null) {
                    continue ;
                }
                reflectionPerm3 =((ReflectionPermission)(
                reflectionPerm1[0].Union(reflectionPerm2[0])));
                reflectionPerm3 = reflectionPerm1[0].Union(reflectionPerm2[0]);
                
                if (reflectionPerm3 == null) {
                    Console.WriteLine(("The union of " + reflection1[0] 
                    + " and " + reflection2[0] + " is null."));
                }
                else {
                    Console.WriteLine(("The union of " 
                    + reflectionPerm1[0].get_Flags() + " and " 
                    + reflectionPerm2[0].get_Flags() + " = " 
                    + ((ReflectionPermission)(reflectionPerm3)).
                    get_Flags().ToString()));
                }
            }
        }
        return returnValue ;
    } //UnionDemo

    // Intersect creates and returns a new permission that is the 
    // intersection of the current permission and the permission specified.
    private boolean IntersectDemo() 
    {
        boolean returnValue = true;
        ReflectionPermissionFlag reflection1[] = 
            new ReflectionPermissionFlag[1];
        ReflectionPermissionFlag reflection2[] = 
            new ReflectionPermissionFlag[1];
        ReflectionPermission reflectionPerm1[] = 
            new ReflectionPermission[1];
        ReflectionPermission reflectionPerm2[] = 
            new ReflectionPermission[1];
        ReflectionPermission reflectionPerm3;
        ReflectionGenerator reflectionGen1 =  
            new ReflectionGenerator();
        ReflectionGenerator reflectionGen2 =  
            new ReflectionGenerator();
        reflectionGen1.ResetIndex();
        while(reflectionGen1.CreateReflection(reflectionPerm1, reflection1)) {
            if (reflectionPerm1[0] == null) {
                continue ;
            }
            Console.WriteLine("***************************************" 
                + "*******************\n");
            reflectionGen2.ResetIndex();
            
            while(reflectionGen2.CreateReflection(reflectionPerm2, 
                reflection2)) {
                if (reflectionPerm2[0] == null) {
                    continue ;
                }
                
                reflectionPerm3 =((ReflectionPermission)(
                    reflectionPerm1[0].Intersect(reflectionPerm2[0])));
                if (reflectionPerm3  != null) {
                    Console.WriteLine(("The intersection of " 
                        + reflection1[0] + " and " 
                        + reflection2[0] + " = " 
                        + ((ReflectionPermission)(reflectionPerm3)).
                        get_Flags().ToString()));
                }
                else {
                    Console.WriteLine(("The intersection of " 
                        + reflection1[0] + " and " + reflection2[0] 
                        + " is null."));
                }
            }
        }
        return returnValue ;
    } //IntersectDemo   
        
    //Copy creates and returns an identical copy of the current permission.
    private boolean CopyDemo() 
    {
        boolean returnValue = true;
        ReflectionPermissionFlag reflection1[] = 
            new ReflectionPermissionFlag[1];
        ReflectionPermission reflectionPerm1[] = 
            new ReflectionPermission[1];
        ReflectionPermission reflectionPerm2[] = 
            new ReflectionPermission[1];
        ReflectionGenerator reflectionGen1 =  
            new ReflectionGenerator();
        ReflectionGenerator reflectionGen2 =  
            new ReflectionGenerator();
        reflectionGen1.ResetIndex();
        
        while(reflectionGen1.CreateReflection(reflectionPerm1, reflection1)) {
            if (reflectionPerm1[0] == null) {
                continue ;
            }
            reflectionGen2.ResetIndex();
            Console.WriteLine("*********************************" 
                + "***********************\n");
            try {
            reflectionPerm2[0] =((ReflectionPermission)(
            reflectionPerm1[0].Copy()));
            Console.WriteLine(("Result of copy = " 
                + reflectionPerm2[0].ToString()));
            } 
            catch(System.Exception  e){
                Console.WriteLine(("Copy failed :" 
                    + reflectionPerm1[0].ToString() + e));
                continue ;
            }
        }
        return returnValue ;
    } //CopyDemo   

    // ToXml creates an XML encoding of the permission and its current state;
    // FromXml reconstructs a permission with the specified state from the 
    // XML encoding.
    private boolean ToFromXmlDemo() 
    {
        boolean returnValue = true;
        ReflectionPermissionFlag reflection1[] = 
            new ReflectionPermissionFlag[1];
        ReflectionPermission reflectionPerm1[] = 
            new ReflectionPermission[1];
        ReflectionPermission reflectionPerm2[] = 
            new ReflectionPermission[1];
        ReflectionGenerator reflectionGen1 =  
            new ReflectionGenerator();
        ReflectionGenerator reflectionGen2 =  
            new ReflectionGenerator();
        reflectionGen1.ResetIndex();
        while(reflectionGen1.CreateReflection(reflectionPerm1, reflection1)) {
            if (reflectionPerm1[0] == null) {
                continue ;
            }
            Console.WriteLine("**************************************" 
                + "******************\n");
            reflectionGen2.ResetIndex();
            try {
                reflectionPerm2[0] = 
                    new ReflectionPermission(PermissionState.None);
                reflectionPerm2[0].FromXml(reflectionPerm1[0].ToXml());
                Console.WriteLine(("Result of ToFromXml = " 
                    + reflectionPerm2[0].ToString()));
            }
            catch(System.Exception e) {
                Console.WriteLine(("ToFromXml failed :" 
                    + reflectionPerm1[0].ToString() + e));
                continue ;
            }
        }
        return returnValue ;
    } //ToFromXmlDemo    

    // Invoke all demos.
    public boolean runDemo() 
    {
        boolean returnCode = true;
        boolean tempReturnCode;
        
        // Call the IsSubsetOf demo.
        if (tempReturnCode = IsSubsetOfDemo()) {
            Console.get_Out().WriteLine("IsSubsetOf demo " 
                + "completed successfully.");
        }
        else {
            Console.get_Out().WriteLine("IsSubsetOf demo failed.");
        }
        returnCode = tempReturnCode && returnCode;
        
        // Call the Union demo.
        if (tempReturnCode = UnionDemo()) {
            Console.get_Out().WriteLine("Union demo completed successfully.");
        }
        else {
            Console.get_Out().WriteLine("Union demo failed.");
        }
        returnCode = tempReturnCode && returnCode;
        
        // Call the Intersect demo.
        if (tempReturnCode = IntersectDemo()) {
            Console.get_Out().WriteLine("Intersect demo completed " 
                + "successfully.");
        }
        else {
            Console.get_Out().WriteLine("Intersect demo failed.");
        }
        returnCode = tempReturnCode && returnCode;
        
        // Call the Copy demo.
        if (tempReturnCode = CopyDemo()) {
            Console.get_Out().WriteLine("Copy demo completed successfully.");
        }
        else {
            Console.get_Out().WriteLine("Copy demo failed.");
        }
        returnCode = tempReturnCode && returnCode;
        
        // Call the ToFromXml demo.
        if (tempReturnCode = ToFromXmlDemo()) {
            Console.get_Out().WriteLine("ToFromXml demo completed " 
                + "successfully.");
        }
        else {
            Console.get_Out().WriteLine("ToFromXml demo failed.");
        }
        returnCode = tempReturnCode && returnCode;
        return returnCode ;
    } //runDemo   
    // Test harness.
    public static void main(String[] args)
    {
        try {
            ReflectionPermissionDemo democase =  
                new ReflectionPermissionDemo();
            boolean returnCode = democase.runDemo();
            if (returnCode) {
                Console.get_Out().WriteLine("ReflectionPermission " 
                    + "demo completed successfully.");
                Console.get_Out().WriteLine("Press the Enter key to exit.");
                String consoleInput = Console.ReadLine();
                System.Environment.set_ExitCode(100);
            }
            else {
                Console.get_Out().WriteLine(
                    "ReflectionPermission demo failed.");
                Console.get_Out().WriteLine("Press the Enter key to exit.");
                String consoleInput = Console.ReadLine();
                System.Environment.set_ExitCode(101);
            }
        }
        catch(System.Exception e) {
            Console.get_Out().WriteLine("ReflectionPermission demo failed.");
            Console.WriteLine(e.ToString());
            Console.get_Out().WriteLine("Press the Enter key to exit.");
            String consoleInput = Console.ReadLine();
            System.Environment.set_ExitCode(101);
        }
    } //main
} //ReflectionPermissionDemo

// This class generates ReflectionPermission objects.
class ReflectionGenerator
{
    private ReflectionPermissionFlag myReflection[] =  {
        ReflectionPermissionFlag.AllFlags, 
        ReflectionPermissionFlag.MemberAccess, 
        ReflectionPermissionFlag.NoFlags, 
        ReflectionPermissionFlag.ReflectionEmit, 
        ReflectionPermissionFlag.TypeInformation};   
    
    private int reflectionIndex = 0;

    public ReflectionGenerator() 
    {
        ResetIndex();
    } //ReflectionGenerator

    public void ResetIndex() 
    {
        reflectionIndex = 0;
    } //ResetIndex

    // CreateReflection creates a ReflectionPermission object.
    public boolean CreateReflection(ReflectionPermission reflectionPerm[],
        ReflectionPermissionFlag reflection[]) 
    {
        if (reflectionIndex >= myReflection.length) {
            reflectionPerm[0] = new ReflectionPermission(PermissionState.None);

            reflection[0] = ReflectionPermissionFlag.NoFlags;
            reflectionIndex++;
            return false ;
        }
        reflection[0] = myReflection[reflectionIndex ++];
        try {
            reflectionPerm[0] = new ReflectionPermission(reflection[0]);
            return true ;
        }
        catch(System.Exception  e){
            Console.WriteLine(("Cannot create ReflectionPermission: " 
                + reflection[0] + " " + e));
            reflectionPerm[0] = new ReflectionPermission(PermissionState.None);
            reflection[0] = ReflectionPermissionFlag.NoFlags;
            return true ;
        }
    } //CreateReflection
} //ReflectionGenerator

System.Object
   System.Security.CodeAccessPermission
    System.Security.Permissions.ReflectionPermission
Les membres statiques publics (Shared en Visual Basic) de ce type sont thread-safe. Il n'est pas garanti que les membres d'instance soient thread-safe.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Édition Media Center, Windows XP Professionnel Édition x64, Windows XP SP2, Windows XP Starter Edition

Le .NET Framework ne prend pas en charge toutes les versions de chaque plate-forme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise.

.NET Framework

Prise en charge dans : 2.0, 1.1, 1.0
Cela vous a-t-il été utile ?
(1500 caractères restants)
Merci pour vos suggestions.

Ajouts de la communauté

Afficher:
© 2014 Microsoft. Tous droits réservés.