FileReaderResult Struct
The result of a FileReader: a string or a byte array (an ArrayBuffer in JavaScript).
public readonly struct FileReaderResult : IEquatable<FileReaderResult>- Implements
Properties
| Name | Description |
|---|---|
| BytesValue | Gets the value as bytes, or null when the result is a string. |
| StringValue | Gets the value as a string, or null when the result is a byte array. |
| Value | Gets the value: a String or a Byte array. |
BytesValue
FileReader.csGets the value as bytes, or null when the result is a string.
public ReadOnlyMemory<byte>? BytesValue { get; }Property value
StringValue
FileReader.csValue
FileReader.csMethods
| Name | Description |
|---|---|
| Equals(FileReaderResult) | Indicates whether the current object is equal to another object of the same type. |
| Equals(object?) | Indicates whether this instance and a specified object are equal. |
| FromBytes(byte[]) | Creates a result from a byte array. |
| FromString(string) | Creates a result from a string. |
| GetHashCode() | Returns the hash code for this instance. |
| ToString() | Returns the fully qualified type name of this instance. |
Equals overloads
Equals(FileReaderResult)
FileReader.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(FileReaderResult other)Parameters
otherFileReaderResult- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.
Equals(object?)
FileReader.csFromBytes(byte[])
FileReader.csCreates a result from a byte array.
public static FileReaderResult FromBytes(byte[] value)FromString(string)
FileReader.csCreates a result from a string.
public static FileReaderResult FromString(string value)GetHashCode()
FileReader.csToString()
FileReader.csOperators
| Name | Description |
|---|---|
| operator ==(FileReaderResult, FileReaderResult) | Returns whether two results have the same value. |
| implicit operator FileReaderResult(byte[]) | Converts a byte array to a result. |
| implicit operator FileReaderResult(string) | Converts a string to a result. |
| operator !=(FileReaderResult, FileReaderResult) | Returns whether two results have different values. |
operator ==(FileReaderResult, FileReaderResult)
FileReader.csReturns whether two results have the same value.
public static bool operator ==(FileReaderResult left, FileReaderResult right)op_Implicit overloads
implicit operator FileReaderResult(byte[])
FileReader.csConverts a byte array to a result.
public static implicit operator FileReaderResult(byte[] value)implicit operator FileReaderResult(string)
FileReader.csConverts a string to a result.
public static implicit operator FileReaderResult(string value)operator !=(FileReaderResult, FileReaderResult)
FileReader.csReturns whether two results have different values.
public static bool operator !=(FileReaderResult left, FileReaderResult right)