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 ساختاربا مشخصات چپ، راست، بالا و پایین.

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

سیستم : بولیان

مساوی ( 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

سیستم : بولیان

بایگانی برچسب ها:

به عنوان یک عملکرد هش برای این نوع عمل می کند.

public override int GetHashCode()
   {
   }

Returns

int

سیستم .Int32.

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

سیستم : بولیان

کارآفرین != ( مارگین ها و مارگن ها )

بررسی کنید که آیا دو ساختار مارجین یکسان نیستند.

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

سیستم : بولیان

 فارسی