Font.GetHashCode Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Bu Fontiçin karma kodunu alır.
public:
override int GetHashCode();
public override int GetHashCode ();
override this.GetHashCode : unit -> int
Public Overrides Function GetHashCode () As Integer
Döndürülenler
Bu Fontiçin karma kodu.
Örnekler
Aşağıdaki kod örneği Windows Forms ile kullanılmak üzere tasarlanmıştır ve Paint olay işleyicisinin bir parametresi olan PaintEventArgse
gerektirir. Kod aşağıdaki eylemleri gerçekleştirir:
Fontoluşturur.
Bu yazı tipinin karma kodunu alır.
Karma kodun değerini içeren bir ileti kutusu görüntüler.
public:
void GetHashCode_Example( PaintEventArgs^ /*e*/ )
{
// Create a Font object.
System::Drawing::Font^ myFont = gcnew System::Drawing::Font( "Arial",16 );
// Get the hash code for myFont.
int hashCode = myFont->GetHashCode();
// Display the hash code in a message box.
MessageBox::Show( hashCode.ToString() );
}
public void GetHashCode_Example(PaintEventArgs e)
{
// Create a Font object.
Font myFont = new Font("Arial", 16);
// Get the hash code for myFont.
int hashCode = myFont.GetHashCode();
// Display the hash code in a message box.
MessageBox.Show(hashCode.ToString());
}
Public Sub GetHashCode_Example(ByVal e As PaintEventArgs)
' Create a Font object.
Dim myFont As New Font("Arial", 16)
' Get the hash code for myFont.
Dim hashCode As Integer = myFont.GetHashCode()
' Display the hash code in a message box.
MessageBox.Show(hashCode.ToString())
End Sub
Şunlara uygulanır
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin