Struct Margins
Der Name: Aspose.Note Zusammensetzung: Aspose.Note.dll (25.4.0)
Spezifiziert die Dimensionen der Margen eines Knoten.
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
Vererbte Mitglieder
object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
Margins (Float, Float und Flotte)
Initialisiert eine neue Instanz des Aspose.Note.Margins Strucksmit den angegebenen linken, rechten, oberen und unteren Margen.
public Margins(float left, float right, float top, float bottom)
{
Left = left;
Right = right;
Top = top;
Bottom = bottom;
}
Parameters
left
float
Die linken Margenweite.
right
float
Die richtige Marginbreite.
top
float
Die maximale Marginalweite.
bottom
float
Die unteren Margenbreite.
Fields
Empty
Die leeren Margen.
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.
Feldwert
Properties
Bottom
Erhalten oder setzen die unteren Marginbreite.
public readonly float Bottom
{
get;
set;
}
Eigentumswert
Left
Erhalten oder setzen die linken Marginweite.
public float Left
{
get => this.Left;
set => this.Left = value;
}
Eigentumswert
Right
Sie erhalten oder setzen die richtige Marginbreite.
public float Right
{
get => this.Right;
set => this.Right = value;
}
Eigentumswert
Top
Erhalten oder setzen die Obermarginbreite.
public float Top
{
get => this._top;
set => this._top = value;
}
private float _top;
Eigentumswert
Methods
Die Margen (Margins)
Prüfen Sie, ob zwei Margin-Strukturen gleich sind.
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
Die Marginstruktur.
Returns
Das System.Boolean
Objekte ( Object )
Prüfen Sie, ob zwei Margin-Strukturen gleich sind.
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
Jedes Objekt.
Returns
Das System.Boolean
GetHashCode()
Es dient als Hash-Funktion für den Typ.
public override int GetHashCode()
{
}
Returns
Das System.Int32.
Operators
Operator = = (Margins und Margins)
Prüfen Sie, ob zwei Margin-Strukturen gleich sind.
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
Die Marginstruktur.
rhs
Margins
Die Marginstruktur ist zu vergleichen.
Returns
Das System.Boolean
Operator! = (Margins und Margins)
Prüfen Sie, ob zwei Margin-Strukturen nicht gleich sind.
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
Die Marginstruktur.
rhs
Margins
Die Marginstruktur ist zu vergleichen.
Returns
Das System.Boolean