다음을 통해 공유


GacMembershipCondition.GetHashCode 메서드

정의

현재 멤버 자격 조건에 대한 해시 코드를 가져옵니다.

public:
 override int GetHashCode();
public override int GetHashCode ();
override this.GetHashCode : unit -> int
Public Overrides Function GetHashCode () As Integer

반환

Int32

0(영)입니다.

예제

다음 코드 예제에서는 메서드의 사용을 보여 있습니다 GetHashCode . 이 예제는에 대해 제공 된 큰 예제의 일부는 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

설명

개체에 서로 구분할 속성이 없으므로 GacMembershipCondition 메서드는 GetHashCode 0을 반환합니다.

적용 대상