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
Margins ( Float, พืช, ตะกร้า)
เริ่มต้นตัวอย่างใหม่ของ 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
ความกว้าง margin ที่ถูกต้อง
top
float
ความกว้าง margin สูงสุด
bottom
float
ความกว้างของ margin ด้านล่าง
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
ได้รับหรือตั้งค่าความกว้าง margin ด้านล่าง
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
ได้รับหรือตั้งค่าความกว้าง margin ด้านบน
public float Top
{
get => this._top;
set => this._top = value;
}
private float _top;
คุณสมบัติมูลค่า
Methods
มาร์จิน (Margins)
ตรวจสอบว่าสองโครงสร้าง 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
โครงสร้างของ Margins
Returns
ระบบ Boolean
วัตถุ (object)
ตรวจสอบว่าสองโครงสร้าง Margins เป็นเท่าเทียมกันหรือไม่
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
ระบบ Boolean
GetHashCode()
ใช้เป็นฟังก์ชั่น hash สําหรับประเภท
public override int GetHashCode()
{
}
Returns
ระบบ.Int32
Operators
ผู้ประกอบการ = = (Margins, Margins)
ตรวจสอบว่าสองโครงสร้าง Margins เป็นเท่าเทียมกันหรือไม่
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
โครงสร้างของ Margins
rhs
Margins
โครงสร้างของ Margins จะเปรียบเทียบกับ
Returns
ระบบ Boolean
ผู้ประกอบการ! = (Margins, Margins)
ตรวจสอบว่าสองโครงสร้างของ Margin ไม่เหมือนกันหรือไม่
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
โครงสร้างของ Margins
rhs
Margins
โครงสร้างของ Margins จะเปรียบเทียบกับ
Returns
ระบบ Boolean