Struct TaskPriority
A configurable property of a Task that controls the order in which the Logix Controller will scan the given Task.
public readonly struct TaskPriority : IEquatable<TaskPriority>
  - Implements
 
- Inherited Members
 
Remarks
TaskPriority is a simple byte value that must be between 1 and 15. Attempting to set the TaskPriority to a value outside that range will result in an ArgumentOutOfRangeException. This parameter will control the scan order of task components as related to other tasks.
Constructors
TaskPriority(byte)
Creates a new instance of TaskPriority with the provided value.
public TaskPriority(byte priority)
  Parameters
prioritybyteThe value of the priority. Must be a value between 1 and 15.
Exceptions
- ArgumentOutOfRangeException
 priority is less than 1 -or- greater than 15.
Methods
Equals(TaskPriority)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(TaskPriority other)
  Parameters
otherTaskPriorityAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
  Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
 true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
  Returns
- int
 A 32-bit signed integer that is the hash code for this instance.
Parse(string)
Parses a string value into a TaskPriority.
public static TaskPriority Parse(string str)
  Parameters
strstringThe string to parse.
Returns
- TaskPriority
 A TaskPriority value if the parse was successful; otherwise; the default value.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
  Returns
- string
 The fully qualified type name.
Operators
operator ==(TaskPriority, TaskPriority)
Determines if the provided objects are equal.
public static bool operator ==(TaskPriority left, TaskPriority right)
  Parameters
leftTaskPriorityAn object to compare.
rightTaskPriorityAn object to compare.
Returns
- bool
 true if the provided objects are equal; otherwise, false.
implicit operator byte(TaskPriority)
Converts a TaskPriority to a byte.
public static implicit operator byte(TaskPriority priority)
  Parameters
priorityTaskPriorityThe value to convert.
Returns
implicit operator TaskPriority(byte)
Converts a byte to a TaskPriority.
public static implicit operator TaskPriority(byte priority)
  Parameters
prioritybyteThe value to convert.
Returns
- TaskPriority
 A TaskPriority value.
operator !=(TaskPriority, TaskPriority)
Determines if the provided objects are not equal.
public static bool operator !=(TaskPriority left, TaskPriority right)
  Parameters
leftTaskPriorityAn object to compare.
rightTaskPriorityAn object to compare.
Returns
- bool
 true if the provided objects are not equal; otherwise, false.