Struct Margins
İsim alanı : Aspose.Note Toplama: Aspose.Note.dll (25.4.0)
Bir düğümün kenarlarının boyutlarını belirler.
public struct Margins : IEquatable<Margins>
{
public double Left;
public double Top;
public double Right;
public double Bottom;
public bool Equals(Margins other)
{
return (this.Left == other.Left && this.Top == other.Top && this.Right == other.Right && this.Bottom == other.Bottom);
}
}
Implements
mirasçı üyeleri
object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
Marginler (Float, Float ve Flut)
Aspose.Note.Margins struct için yeni bir örnek başlatırYukarıda belirtilen sol, sağ, üst ve alt marjları ile.
public Margins(float left, float right, float top, float bottom)
{
Left = left;
Right = right;
Top = top;
Bottom = bottom;
}
Parameters
left
float
Sol marj genişliği.
right
float
Doğru marj genişliği.
top
float
En yüksek marj genişliği.
bottom
float
Düşük marj genişliği.
Fields
Empty
Boş marjları var.
public static readonly Margins Empty = new Margins();
In this case, no changes were made because the given code already follows standard C# conventions. When dealing with more complex scenarios, additional adjustments such as line wrapping at appropriate indentation levels and consistent spacing between keywords and operands may be necessary.
alan değeri
Properties
Bottom
Alın veya alt marj genişliğini ayarlayın.
public readonly float Bottom
{
get;
set;
}
Mülkiyet Değer
Left
Sol marj genişliğini alır veya ayarlar.
public float Left
{
get => this.Left;
set => this.Left = value;
}
Mülkiyet Değer
Right
Doğru marj genişliği alır veya ayarlar.
public float Right
{
get => this.Right;
set => this.Right = value;
}
Mülkiyet Değer
Top
Top marj genişliği alır veya ayarlar.
public float Top
{
get => this._top;
set => this._top = value;
}
private float _top;
Mülkiyet Değer
Methods
Eşitlikler (Margins )
İki Margin yapısının eşit olup olmadığını test edin.
public bool Equals(Margins other)
{
return (this.Left == other.Left)
&& (this.Top == other.Top)
&& (this.Right == other.Right)
&& (this.Bottom == other.Bottom);
}
Parameters
other
Margins
Margin yapısı ile ilgili.
Returns
Bu sistem boolean.
Eşitlikler ( Object )
İki Margin yapısının eşit olup olmadığını test edin.
public override bool Equals(object obj)
{
if (obj is null || !(obj is MyClass)) // Changed line break to improve readability
return false;
var other = (MyClass)obj; // Casting variable declaration on the same line for better readability
return this.Property1 == other.Property1 && this.Property2 == other.Property2; // Aligned conditions for better readability
}
Parameters
obj
object
Her türlü nesne.
Returns
Bu sistem boolean.
GetHashCode () için yorumlar
Tip için bir hash fonksiyonu olarak hizmet eder.
public override int GetHashCode()
{
}
Returns
Sistem.Int32 ile ilgili bilgiler.
Operators
Operatör = = (Margins ve Margins)
İki Margin yapısının eşit olup olmadığını test edin.
public static bool operator==(Margins lhs, Margins rhs)
{
return (lhs.Left == rhs.Left) &&
(lhs.Right == rhs.Right) &&
(lhs.Top == rhs.Top) &&
(lhs.Bottom == rhs.Bottom);
}
Parameters
lhs
Margins
Margin yapısı ile ilgili.
rhs
Margins
Margin yapısı ile karşılaştırılmalıdır.
Returns
Bu sistem boolean.
Sürücü = (Margins ve Margins)
İki Margin yapısının eşit olup olmadığını test edin.
public static bool operator !=(Margins lhs, Margins rhs)
{
return !(lhs.Left == rhs.Left &&
lhs.Right == rhs.Right &&
lhs.Top == rhs.Top &&
lhs.Bottom == rhs.Bottom);
}
Parameters
lhs
Margins
Margin yapısı ile ilgili.
rhs
Margins
Margin yapısı ile karşılaştırılmalıdır.
Returns
Bu sistem boolean.