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
Κληρονομημένα μέλη
object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
Μαργαριτάρια (πλοία, πλοίο, σκάφος)
Αρχίζει μια νέα περίπτωση του Aspose.Note.Margins structμε τα καθορισμένα αριστερά, δεξιά, πάνω και κάτω περιθώρια.
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.
Αξία πεδίου
Properties
Bottom
Αποκτά ή καθορίζει το κάτω πλάτος περιθωρίου.
public readonly float Bottom
{
get;
set;
}
Αξία ιδιοκτησίας
Left
Αποκτά ή καθορίζει το πλάτος της αριστεράς περιθωρίου.
public float Left
{
get => this.Left;
set => this.Left = value;
}
Αξία ιδιοκτησίας
Right
Αποκτά ή καθορίζει το σωστό πλάτος περιθωρίου.
public float Right
{
get => this.Right;
set => this.Right = value;
}
Αξία ιδιοκτησίας
Top
Αποκτά ή καθορίζει το μέγιστο πλάτος περιθωρίου.
public float Top
{
get => this._top;
set => this._top = value;
}
private float _top;
Αξία ιδιοκτησίας
Methods
Μάρκινς (Margins)
Δοκιμάστε αν οι δύο δομές 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
Το σύστημα.Boolean
Το αντικείμενο (object)
Δοκιμάστε αν οι δύο δομές Margins είναι ίσες.
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
Το σύστημα.Boolean
Κορυφαία Κώδικα ()
Λειτουργεί ως λειτουργία hash για τον τύπο.
public override int GetHashCode()
{
}
Returns
Το σύστημα.Int32.
Operators
Ο διαχειριστής = = (Margins, Margins)
Δοκιμάστε αν οι δύο δομές Margins είναι ίσες.
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
Η δομή των Margins πρέπει να συγκριθεί με.
Returns
Το σύστημα.Boolean
Ετικέτες (Margins και Margins)
Δοκιμάστε αν οι δύο δομές Margins δεν είναι ίσες.
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
Η δομή των Margins πρέπει να συγκριθεί με.
Returns
Το σύστημα.Boolean