Union
TextReadError
union struct TextReadError
Module: System.IO
Assembly: System.Runtime.dll
Source file: TextReadError.rvn
Inheritance: Object → ValueType → TextReadError
An expected text-reading failure.
Remarks
Preserves the named input StreamError distinction or reports InvalidUtf8. InvalidRange rejects negative bounds; LimitExceeded reports bounds or size overflow. Cases are values; patterns test and extract the active case. Use named case patterns. The default union is inactive: HasValue is false, Value is null and ToString returns Empty.
Cases
14 cases
case InvalidPath
The InvalidPath text-reading error case.
case NotFound
The NotFound text-reading error case.
case AccessDenied
The AccessDenied text-reading error case.
case WrongKind
The WrongKind text-reading error case.
case AlreadyExists
The AlreadyExists text-reading error case.
case Busy
Another read operation is pending on this reader.
case Closed
The Closed text-reading error case.
case InvalidRange
The InvalidRange text-reading error case.
case LimitExceeded
The LimitExceeded text-reading error case.
case WrongAccess
The WrongAccess text-reading error case.
case IoFailure
The IoFailure text-reading error case.
case InvalidUtf8
The InvalidUtf8 text-reading error case.
case InvalidEncoding
The selected encoding rejects the source or the decoder is no longer usable.
case InvalidData
The underlying byte stream rejected malformed binary content.
Properties
2 items
HasValue: bool
Reports whether the union contains an active case.
Value: object?
Projects the active case as an Object for compiler support.
Methods
4 items
Equals(other: object?) -> bool
Tests reference identity by default; an ordinary class may override equality.
Inherited from Object.Equals
GetHashCode() -> int
Returns a stable identity hash by default; an ordinary class may override it consistently with equality.
Inherited from Object.GetHashCode
GetType() -> TypeInfo
Returns metadata for the concrete runtime type of this instance.
Inherited from Object.GetType
ToString() -> string
Returns the active case name, or Empty for an inactive default.
Overrides Object.ToString