Struct Margins

Struct Margins

Navne til: Aspose.Note Sammensætning: Aspose.Note.dll (25.4.0)

Det angiver dimensionerne af en knudets marginer.

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

De arvede medlemmer

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

Constructors

Margins (flåde, flåde og flåder)

Initialiserer en ny instans af Aspose.Note.Margins strukturmed de angivne venstre, højre, øverste og nedre marginer.

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

Parameters

left float

Den venstre marginal bredde.

right float

Den rigtige marginal bredde.

top float

Den øverste marginal bredde.

bottom float

Den nederste marginal bredde.

Fields

Empty

De tomme marginer.

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.

Fællesværdi

Margins

Properties

Bottom

Giver eller sætter den nederste marginalbredde.

public readonly float Bottom
   {
      get;
      set;
   }

Ejendomsværdi

float

Left

Få eller indsætte venstre marginalbredde.

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

Ejendomsværdi

float

Right

Giver eller sætter den rigtige marginalbredde.

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

Ejendomsværdi

float

Top

Få eller indsætte den øverste marginalbredde.

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

Ejendomsværdi

float

Methods

De samme (Margins)

Tester, om to marginstrukturer er ens.

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

Det er Margins struktur.

Returns

bool

Systemet er Boolean.

De samme objekter (objekt)

Tester, om to marginstrukturer er ens.

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

ethvert objekt.

Returns

bool

Systemet er Boolean.

GivHashCode()

Det fungerer som en hashfunktion for den type.

public override int GetHashCode()
   {
   }

Returns

int

Det nye system.Int32.

Operators

Operatør = = (Margins og Margins)

Tester, om to marginstrukturer er ens.

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

Det er Margins struktur.

rhs Margins

Margins struktur skal sammenlignes med.

Returns

bool

Systemet er Boolean.

Operatør! = (Margins og Margins)

Test, om to marginstrukturer ikke er ens.

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

Det er Margins struktur.

rhs Margins

Margins struktur skal sammenlignes med.

Returns

bool

Systemet er Boolean.

 Dansk