Struct Size
Represents the size of an object.
Implements
System.IEquatable<Size>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: GraphShape
Assembly: GraphShape.dll
Syntax
[Serializable]
public struct Size : IEquatable<Size>
Constructors
| Improve this Doc View SourceSize(Double, Double)
Constructor.
Declaration
public Size(double width, double height)
Parameters
Type | Name | Description |
---|---|---|
System.Double | width | Width. |
System.Double | height | Height. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
Fields
| Improve this Doc View SourceEmpty
Empty size.
Declaration
public static readonly Size Empty
Field Value
Type | Description |
---|---|
Size |
Properties
| Improve this Doc View SourceHeight
Height
Declaration
public double Height { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | If trying to update an empty Size. |
System.ArgumentOutOfRangeException | Value is negative. |
IsEmpty
Indicates if this size is empty.
Declaration
public readonly bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Width
Width.
Declaration
public double Width { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | If trying to update an empty Size. |
System.ArgumentOutOfRangeException | Value is negative. |
Methods
| Improve this Doc View SourceEquals(Size)
Declaration
public bool Equals(Size other)
Parameters
Type | Name | Description |
---|---|---|
Size | other |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(Size, Size)
Compares the two specified Vectors for equality.
Declaration
public static bool Equals(Size size1, Size size2)
Parameters
Type | Name | Description |
---|---|---|
Size | size1 | The first Vector to compare. |
Size | size2 | The second Vector to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if both Vector are equal, otherwise false. |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.ValueType.Equals(System.Object)
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.ValueType.GetHashCode()
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.ValueType.ToString()
Operators
| Improve this Doc View SourceEquality(Size, Size)
Indicates whether both Size are equal.
Declaration
public static bool operator ==(Size size1, Size size2)
Parameters
Type | Name | Description |
---|---|---|
Size | size1 | First Size to compare. |
Size | size2 | Second Size to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if both Size are equal, otherwise false. |
Inequality(Size, Size)
Indicates whether both Size are not equal.
Declaration
public static bool operator !=(Size size1, Size size2)
Parameters
Type | Name | Description |
---|---|---|
Size | size1 | First Size to compare. |
Size | size2 | Second Size to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if both Size are equal, otherwise false. |
Implements
System.IEquatable<T>