在Equals()方法。 此方法用於根據y座標比較兩個點,並返回布林值。
重要的是要注意,此方法只能用於同類的Point物件。 嘗試使用此方法比較不同類的兩個點,例如比較NullReferenceException。
using IronSoftware.Drawing;
using System;
// Instantiate 2 points using float parameter
PointF pointFloat = new PointF(22.2f, 25.7f);
PointF pointFloat2 = new PointF(30.2f, 55.7f);
// Check for equality of the double parameter between 2 points
Console.WriteLine(pointFloat.Equals(pointFloat2));
Imports IronSoftware.Drawing
Imports System
' Instantiate 2 points using float parameter
Dim pointFloat As New PointF(22.2F, 25.7F)
Dim pointFloat2 As New PointF(30.2F, 55.7F)
' Check for equality of the double parameter between 2 points
Console.WriteLine(pointFloat.Equals(pointFloat2))在Equals()方法。 此方法用於根據y座標比較兩個點,並返回布林值。
重要的是要注意,此方法只能用於同類的Point物件。 嘗試使用此方法比較不同類的兩個點,例如比較NullReferenceException。
Nuget Downloads 20,274,271|版本:2026.11剛剛發布