Struct Margins

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

IEquatable

继承人

object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Constructors

Margins(海洋、航海、船舶)

启动 Aspose.Note.Margins 结构的新例子指定的左、右、上和底边。

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.

领域价值

Margins

Properties

Bottom

接收或设置底边宽。

public readonly float Bottom
   {
      get;
      set;
   }

财产价值

float

Left

接收或设置左边边界宽度。

public float Left
   {
      get => this.Left;
      set => this.Left = value;
   }

财产价值

float

Right

接收或设置正确的边界宽度。

public float Right
    {
       get => this.Right;
       set => this.Right = value;
    }

财产价值

float

Top

接收或设置顶级边界宽度。

public float Top
   {
      get => this._top;
      set => this._top = value;
   }
   private float _top;

财产价值

float

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

bool

这个系统,Boolean。

平等(对象)

测试两个边缘结构是否平等。

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

bool

这个系统,Boolean。

GetHashCode( )

作为该类型的Hash函数。

public override int GetHashCode()
   {
   }

Returns

int

此分類上一篇: Int32

Operators

主持人 = = (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

边缘结构。

rhs Margins

与 Margins 相比较。

Returns

bool

这个系统,Boolean。

主持人!=(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

边缘结构。

rhs Margins

与 Margins 相比较。

Returns

bool

这个系统,Boolean。

 中文