CompilerInfo::GetHashCode Method ()
Returns the hash code for the current instance.
Assembly: System (in System.dll)
Return Value
Type: System::Int32A 32-bit signed integer hash code for the current CompilerInfo instance, suitable for use in hashing algorithms and data structures such as a hash table.
This method overrides the Object::GetHashCode method.
This method generates the same hash code for two objects that are equal according to the Equals method.
The following code example creates an instance of the Microsoft.VisualBasic::VBCodeProvider class. The example displays the provider name, hash code, and default file name extension for the new provider instance. This code example is part of a larger example provided for the CompilerInfo class.
// Get the provider for Microsoft.VisualBasic
// CodeDomProvider^ provider = CodeDomProvider.CreateProvider("VisualBasic");
CodeDomProvider^ provider = CodeDomProvider::CreateProvider("VisualBasic");
if ( provider ) // Display the Visual Basic language provider information.
{
Console::WriteLine( "Visual Basic provider is {0}", provider->ToString() );
Console::WriteLine( " Provider hash code: {0}", provider->GetHashCode().ToString() );
Console::WriteLine( " Default file extension: {0}", provider->FileExtension );
}
for calling members of CompilerInfo. Demand value: LinkDemand; Associated PermissionState enumeration value: Unrestricted; NIB: Named Permission Sets: FullTrust.
Available since 2.0