Struct Margins

Struct Margins

Pôvodný názov: Aspose.Note Zhromaždenie: Aspose.Note.dll (25.4.0)

Určuje rozmery hraníc uzla.

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

Z dedičných členov

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

Constructors

Margins (pláva, plavba, pláva a plavidlo)

Initalizuje novú inštanciu Aspose.Note.Margins structso špecifikovanými ľavými, pravými a dolnými hranicami.

public Margins(float left, float right, float top, float bottom)
   {
      Left = left;
      Right = right;
      Top = top;
      Bottom = bottom;
   }

Parameters

left float

V ľavej marginálnej šírke.

right float

Pravá šírka hranice.

top float

Najvyššia marginálna šírka.

bottom float

Dnešná marginálna šírka.

Fields

Empty

a prázdne marže.

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.

Fieldová hodnota

Margins

Properties

Bottom

Dostane alebo nastaví spodnú šírku hranice.

public readonly float Bottom
   {
      get;
      set;
   }

Hodnota nehnuteľnosti

float

Left

Získajte alebo nastavíte ľavú hranicu.

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

Hodnota nehnuteľnosti

float

Right

Dostane alebo nastaví správnu šírku hranice.

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

Hodnota nehnuteľnosti

float

Top

Získajte alebo nastavíte šírku hornej hranice.

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

Hodnota nehnuteľnosti

float

Methods

Rovnováhy ( Margins )

Otestujte, či sú dve maržové štruktúry rovnaké.

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

Štruktúra Margínov.

Returns

bool

Systém je boolean.

Rovnako ako objekt (objekt)

Otestujte, či sú dve maržové štruktúry rovnaké.

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

akýkoľvek objekt.

Returns

bool

Systém je boolean.

ZískaťHashCode()

Slúži ako funkcia hash pre typ.

public override int GetHashCode()
   {
   }

Returns

int

Spoločnosť Int32.

Operators

Prevádzkovateľ = = (Margins, Margins)

Otestujte, či sú dve maržové štruktúry rovnaké.

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

Štruktúra Margínov.

rhs Margins

V porovnaní so štruktúrou Margins.

Returns

bool

Systém je boolean.

Prevádzkovateľ ! = (Margins, Margins)

Otestujte, či dve maržové štruktúry nie sú rovnaké.

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

Štruktúra Margínov.

rhs Margins

V porovnaní so štruktúrou Margins.

Returns

bool

Systém je boolean.

 Slovenčina