# Class Sort OptimaJet.Workflow.Api.Models.Sort A collection sorting rule identifying a field and its direction. Namespace: [OptimaJet.Workflow.Api.Models](https://api.workflowengine.io/web-api/OptimaJet.Workflow.Api.Models/) ```csharp public class Sort where TField : Enum ``` ## Constructors ### `public Sort(TField field, Direction direction)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `field` | `{TField}` | | | `direction` | `Direction` | | ## Properties ### `[JsonConverter(typeof(StringEnumConverter))] [JsonConverter(typeof(JsonStringEnumConverter))] public TField Field { get; }` Gets the field value. ### `[JsonConverter(typeof(StringEnumConverter))] [JsonConverter(typeof(JsonStringEnumConverter))] public Direction Direction { get; }` Gets the direction value. ## Methods ### `public static bool TryParse(string? value, out Sort? sort)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `value` | `String` | | | `sort` | `Sort` | | ### Returns | Type | Description | | --- | --- | | `Boolean` | | [Previous SetStateWithoutExecutionResponse](https://api.workflowengine.io/web-api/OptimaJet.Workflow.Api.Models/SetStateWithoutExecutionResponse/) [Next StatusField](https://api.workflowengine.io/web-api/OptimaJet.Workflow.Api.Models/StatusField/)