Class SortDescription
Inheritance
Namespace: Syncfusion.Data
Assembly: Syncfusion.Data.Portable.dll
Syntax
public sealed class SortDescription : ValueType
Constructors
SortDescription(String, ListSortDirection)
Initializes a new instance of the SortDescription struct.
Declaration
public SortDescription(string propertyName, ListSortDirection direction)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | The property of the underlying collection view based on which sorting is to be performed. |
ListSortDirection | direction | The direction in which sorting is to be applied. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Invalid Enum |
Properties
Direction
Gets or sets a value that indicates whether to sort in ascending or descending order.
Declaration
public ListSortDirection Direction { get; set; }
Property Value
Type | Description |
---|---|
ListSortDirection | A ListSortDirection value to indicate whether to sort in ascending or descending order. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Invalid enum |
IsSealed
Gets a value that indicates whether this object is in an immutable state.
Declaration
public bool IsSealed { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True if this object is in immutable state, otherwise false. |
PropertyName
Gets or sets the property of the underlying collection view based on which sorting
is to be performed.
Declaration
public string PropertyName { get; set; }
Property Value
Type | Description |
---|---|
System.String | the property of the underlying collection view based on which sorting is to be performed. |
Methods
Equals(Object)
Compares the specified instance and the current instance of SortDescription for value equality.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The SortDescription instance to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if |
GetHashCode()
Returns the hash code for this instance of SortDescription.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | The hash code for this instance of SortDescription. |
Operators
Equality(SortDescription, SortDescription)
Compares two SortDescription objects for value equality.
Declaration
public static bool operator ==(SortDescription sortdescription1, SortDescription sortdescription2)
Parameters
Type | Name | Description |
---|---|---|
SortDescription | sortdescription1 | The first instance to compare. |
SortDescription | sortdescription2 | The second instance to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if the two objects are equal, otherwise false. |
Inequality(SortDescription, SortDescription)
Compares two SortDescription objects for value inequality.
Declaration
public static bool operator !=(SortDescription sortdescription1, SortDescription sortdescription2)
Parameters
Type | Name | Description |
---|---|---|
SortDescription | sortdescription1 | The first instance to compare. |
SortDescription | sortdescription2 | The second instance to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if the values are not equal, otherwise false. |