Font.GetHashCode Yöntem
Ö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
Bu Fontiçin karma kodu.
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
Ürün | Sürümler |
---|---|
.NET | 6, 7, 8, 9 |
.NET Framework | 1.1, 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, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET geri bildirimi
.NET, açık kaynak bir projedir. Geri bildirim sağlamak için bir bağlantı seçin: