Struct Margins

Struct Margins

Le nom : Aspose.Note Assemblée: Aspose.Note.dll (25.4.0)

Définir les dimensions des marges d’un node.

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

I membri ereditari

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

Constructors

Margins (float, flot, float et flot)

Initialisez une nouvelle instance du Aspose.Note.Margins structavec les marges gauche, droite, supérieure et inférieure spécifiées.

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

Parameters

left float

La largeur de la marge gauche.

right float

La largeur de marge droite.

top float

La hauteur de la marge.

bottom float

La largeur de la marge inférieure.

Fields

Empty

Les marges vides.

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.

Valore di campo

Margins

Properties

Bottom

Obtenez ou définissez la largeur de la marge inférieure.

public readonly float Bottom
   {
      get;
      set;
   }

Valore di proprietà

float

Left

Obtenez ou définissez la largeur de la marge gauche.

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

Valore di proprietà

float

Right

Obtenez ou définissez la largeur de marge correcte.

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

Valore di proprietà

float

Top

Obtenez ou définissez la largeur de marge supérieure.

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

Valore di proprietà

float

Methods

Les équations (Margins)

Vérifier si les deux marges sont égaux.

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

La structure des margins.

Returns

bool

Le système : Boolean.

Les équations (objet)

Vérifier si les deux marges sont égaux.

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

Tout objet.

Returns

bool

Le système : Boolean.

Résumé du code()

Il sert d’une fonction hash pour le type.

public override int GetHashCode()
   {
   }

Returns

int

Le système.Int32.

Operators

L’opérateur = = (Margins et Margins)

Vérifier si les deux marges sont égaux.

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

La structure des margins.

rhs Margins

La structure des marges à comparer.

Returns

bool

Le système : Boolean.

L’opérateur ! = (Margins et Margins)

Vérifier si les deux marges ne sont pas égaux.

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

La structure des margins.

rhs Margins

La structure des marges à comparer.

Returns

bool

Le système : Boolean.

 Français