This documentation is archived and is not being maintained.

GacMembershipCondition.GacMembershipCondition Constructor

Initializes a new instance of the GacMembershipCondition class.

Namespace: System.Security.Policy
Assembly: mscorlib (in mscorlib.dll)

public GacMembershipCondition ()
public GacMembershipCondition ()
public function GacMembershipCondition ()
Not applicable.

Code satisfies this membership condition if it is installed in the global assembly cache.

The following code example shows the use of the GacMembershipCondition constructor. This example is part of a larger example provided for the GacMembershipCondition class topic.

GacMembershipCondition Gac1 = new GacMembershipCondition();
try
{
    Console.WriteLine(
        "Result of GetHashCode for a GacMembershipCondition = " + 
        Gac1.GetHashCode().ToString() + "\n");
}
catch (Exception e)
{
    Console.WriteLine("GetHashCode failed : " + Gac1.ToString() + e);
    return false;
}

GacMembershipCondition gac1 = new GacMembershipCondition();

try {
    Console.WriteLine(
        ("Result of GetHashCode for a GacMembershipCondition = " 
        + gac1.GetHashCode() + "\n"));
}
catch (System.Exception e) {
    Console.WriteLine(("GetHashCode failed : " + gac1.ToString() + e));
    return false;
}

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Show: