Struct Margins
Numele spaţiului: Aspose.Note Asamblare: Aspose.Note.dll (25.4.0)
Specifica dimensiunile marginii unui nod.
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
Membrii moștenitori
object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
Marginele (flăcări, floate, flotă și float)
Inițializează o nouă instanță a Aspose.Note.Margins structcu marginile de stânga, dreapta, de sus și de jos specificate.
public Margins(float left, float right, float top, float bottom)
{
Left = left;
Right = right;
Top = top;
Bottom = bottom;
}
Parameters
left
float
Marjă de stânga.
right
float
Marja dreaptă de marjă.
top
float
Suprafața marjă maximă.
bottom
float
Lungimea marginii inferioare.
Fields
Empty
marginile goale.
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.
Valoarea câmpului
Properties
Bottom
Obține sau stabilește lățimea marginii inferioare.
public readonly float Bottom
{
get;
set;
}
Valoarea proprietății
Left
Obține sau stabilește lățimea marginii stângă.
public float Left
{
get => this.Left;
set => this.Left = value;
}
Valoarea proprietății
Right
Obține sau stabilește lățimea de marjă corectă.
public float Right
{
get => this.Right;
set => this.Right = value;
}
Valoarea proprietății
Top
Obține sau stabilește lățimea marjă superioară.
public float Top
{
get => this._top;
set => this._top = value;
}
private float _top;
Valoarea proprietății
Methods
Cuvânt cheie (Margins)
Verificați dacă două structuri de margine sunt egale.
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
Structura de margini.
Returns
Cuvânt cheie: Boolean
Obiectivul (Object)
Verificați dacă două structuri de margine sunt egale.
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
orice obiect.
Returns
Cuvânt cheie: Boolean
Cuvânt cheie()
Acesta servește ca o funcție hash pentru tipul.
public override int GetHashCode()
{
}
Returns
Cuvânt cheie: Int32.
Operators
Operatorul = = (Margins și Margins)
Verificați dacă două structuri de margine sunt egale.
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
Structura de margini.
rhs
Margins
Structura marginelor trebuie comparată cu.
Returns
Cuvânt cheie: Boolean
Cuvânt cheie! = (Margins și Margins)
Verificați dacă două structuri de margine nu sunt egale.
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
Structura de margini.
rhs
Margins
Structura marginelor trebuie comparată cu.
Returns
Cuvânt cheie: Boolean