GacMembershipCondition.GetHashCode Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a hash code for the current membership condition.
public:
override int GetHashCode();
public override int GetHashCode ();
override this.GetHashCode : unit -> int
Public Overrides Function GetHashCode () As Integer
0 (zero).
The following code example shows the use of the GetHashCode method. This example is part of a larger example provided for the GacMembershipCondition class.
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
The GetHashCode method returns 0 (zero) because GacMembershipCondition objects have no properties to distinguish one from another.
Produit | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
Commentaires sur .NET
.NET est un projet open source. Sélectionnez un lien pour fournir des commentaires :