New to Telerik Document Processing? Start a free 30-day trial

SizeI

Struct

Represents a two-dimensional size with integer width and height values for worksheet elements.

Definition

Namespace:Telerik.Documents.Spreadsheet.Model

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public struct SizeI

Constructors

Initializes a new instance of the SizeI class with specified width and height, both must be non-negative.

C#
public SizeI(int width, int height)
Parameters:widthint

The width.

heightint

The height.

Properties

Gets a special empty size instance used to indicate an uninitialized or invalid size.

C#
public static SizeI Empty { get; }
Property Value:

The empty size value.

Gets or sets the vertical dimension in integer units, must be non-negative.

C#
public int Height { get; set; }
Property Value:

The height.

Gets whether this size represents an empty or uninitialized state.

C#
public bool IsEmpty { get; }
Property Value:

The value indicating whether the size is empty.

Gets or sets the horizontal dimension in integer units, must be non-negative.

C#
public int Width { get; set; }
Property Value:

The width.

Methods

Determines whether the specified object is a SizeI with the same width and height values.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with the current object.

Returns:

bool

True if the specified object is equal to the current object; otherwise, false.

Overrides: ValueType.Equals(object)

Determines whether the specified size has the same width and height as this instance.

C#
public bool Equals(SizeI value)
Parameters:valueSizeI

The other size.

Returns:

bool

The value indicating whether the specified size is equal to this instance.

Computes a hash code based on the width and height values for dictionary and hash table usage.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: ValueType.GetHashCode()

Returns a string representation of the size in "width,height" format or "Empty" for empty sizes.

C#
public override string ToString()
Returns:

string

A string that represents the current object.

Overrides: ValueType.ToString()

Operators

Determines whether two sizes have different width or height values.

C#
public static bool operator !=(SizeI size1, SizeI size2)
Parameters:size1SizeI

The size1 value.

size2SizeI

The size2 value.

Returns:

bool

The result of the operator.

Determines whether two sizes have equal width and height values.

C#
public static bool operator ==(SizeI size1, SizeI size2)
Parameters:size1SizeI

The size1 value.

size2SizeI

The size2 value.

Returns:

bool

The result of the operator.