Show / Hide Table of Contents

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 Source

Size(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

width or height is negative.

Fields

| Improve this Doc View Source

Empty

Empty size.

Declaration
public static readonly Size Empty
Field Value
Type Description
Size

Properties

| Improve this Doc View Source

Height

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.

| Improve this Doc View Source

IsEmpty

Indicates if this size is empty.

Declaration
public readonly bool IsEmpty { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

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 Source

Equals(Size)

Declaration
public bool Equals(Size other)
Parameters
Type Name Description
Size other
Returns
Type Description
System.Boolean
| Improve this Doc View Source

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.

| Improve this Doc View Source

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 Source

Equality(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.

| Improve this Doc View Source

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>

Extension Methods

GraphHelpers.GetDistances<TVertex, TEdge, TGraph>(TGraph)
GraphHelpers.GetDiameter<TVertex, TEdge, TGraph>(TGraph)
GraphHelpers.GetDiameter<TVertex, TEdge, TGraph>(TGraph, out Double[,])
  • Improve this Doc
  • View Source
In This Article
Back to top GraphShape