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

Маргины (флот, флот, флот)

Инициализует новую инстанцию 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.

Полевая ценность

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.

Объекты ( 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

bool

Система и Boolean.

Скриншоты (

Он служит функцией хаша для типа.

public override int GetHashCode()
   {
   }

Returns

int

Система.инт32.

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

bool

Система и Boolean.

Оператор! = (Маргины и Маргинс)

Проверьте, не равны ли две структуры маргина.

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

bool

Система и Boolean.

 Русский