Struct Margins
اسم الفضاء : Aspose.Note تجميع: Aspose.Note.dll (25.4.0)
يحدد أبعاد حدود العقد.
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
الأعضاء الموروثين
object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
المارجين (السفينة والسطح والطائرات والبحرية)
يبدأ حالة جديدة من Aspose.Note.Margins structمع المعايير المحددة اليسار واليمين والأعلى والأسفل.
public Margins(float left, float right, float top, float bottom)
{
Left = left;
Right = right;
Top = top;
Bottom = bottom;
}
Parameters
left
float
العرض الأيسر من الحدود.
right
float
نطاق الحد الأيمن.
top
float
العرض العلوي للحدود.
bottom
float
نطاق الحد الأدنى.
Fields
Empty
المراحل الفارغة .
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.
القيمة الميدانية
Properties
Bottom
يحصل أو يضع عرض الحدود السفلى.
public readonly float Bottom
{
get;
set;
}
قيمة الممتلكات
Left
يحصل أو يضع عرض الحدود اليسرى.
public float Left
{
get => this.Left;
set => this.Left = value;
}
قيمة الممتلكات
Right
يحصل أو يضع عرض الحدود الصحيح.
public float Right
{
get => this.Right;
set => this.Right = value;
}
قيمة الممتلكات
Top
يحصل أو يحدد عرض العرض العلوي.
public float Top
{
get => this._top;
set => this._top = value;
}
private float _top;
قيمة الممتلكات
Methods
المساواة ( Margins )
اختبار ما إذا كانت اثنين من الهياكل مارجين متساوية.
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
هيكل المارجين .
Returns
النظام - بوليان
المساواة ( Object )
اختبار ما إذا كانت اثنين من الهياكل مارجين متساوية.
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
أي كائن
Returns
النظام - بوليان
كلمات متعلقة ( )
ويعمل كوظيفة هاتش للنوع.
public override int GetHashCode()
{
}
Returns
النظام .Int32.
Operators
كلمات مفتاحية = ( مارجينز ، مارجينز )
اختبار ما إذا كانت اثنين من الهياكل مارجين متساوية.
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
هيكل المارجين .
rhs
Margins
يجب مقارنتها بالهيكل المارغيني.
Returns
النظام - بوليان
كلمات مفتاحية = ( مارجينز ، مارجينز )
اختبار ما إذا كانت اثنين من الهياكل مارجين ليست متساوية.
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
هيكل المارجين .
rhs
Margins
يجب مقارنتها بالهيكل المارغيني.
Returns
النظام - بوليان