GacMembershipCondition 构造函数

定义

初始化 GacMembershipCondition 类的新实例。

public:
 GacMembershipCondition();
public GacMembershipCondition ();
Public Sub New ()

示例

下面的代码示例演示如何使用 GacMembershipCondition 构造函数。 此示例是为类主题提供的更大示例的 GacMembershipCondition 一部分。

GacMembershipCondition ^ Gac1 = gcnew GacMembershipCondition;
try
{
    Console::WriteLine(
        "Result of GetHashCode for a GacMembershipCondition = {0}\n",
        Gac1->GetHashCode());
}
catch (Exception^ e) 
{
     Console::WriteLine("GetHashCode failed : {0}{1}", Gac1, e);
     return false;
}
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;
}
Dim Gac1 As New GacMembershipCondition
Try
    Console.WriteLine( _
        ("Result of GetHashCode for a GacMembershipCondition = " _
        & Gac1.GetHashCode().ToString() & ControlChars.Lf))
Catch e As Exception
    Console.WriteLine(("GetHashCode failed : " & _
        Gac1.ToString() & e.ToString()))
    Return False
End Try

注解

如果代码安装在全局程序集缓存中,则它满足此成员资格条件。

适用于