StringOrBlob Struct
The data of a representation of a ClipboardItem: a string or a StringOrBlob.Blob (the result of a ClipboardItemData promise).
public readonly struct StringOrBlob : IEquatable<StringOrBlob>- Implements
Properties
| Name | Description |
|---|---|
| Blob | Gets the value when it is a blob, or null. |
| StringValue | Gets the value when it is a string, or null. |
| Value | Gets the value: a String or a Blob. |
Blob
ClipboardItem.csStringValue
ClipboardItem.csValue
ClipboardItem.csMethods
| Name | Description |
|---|---|
| Equals(StringOrBlob) | 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. |
| FromBlob(Blob) | Creates the union from a blob. |
| FromString(string) | Creates the union from a string. |
| GetHashCode() | Returns the hash code for this instance. |
| ToString() | Returns the fully qualified type name of this instance. |
Equals overloads
Equals(StringOrBlob)
ClipboardItem.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(StringOrBlob other)Parameters
otherStringOrBlob- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.
Equals(object?)
ClipboardItem.csFromBlob(Blob)
ClipboardItem.csCreates the union from a blob.
public static StringOrBlob FromBlob(Blob value)FromString(string)
ClipboardItem.csCreates the union from a string.
public static StringOrBlob FromString(string value)GetHashCode()
ClipboardItem.csToString()
ClipboardItem.csOperators
| Name | Description |
|---|---|
| operator ==(StringOrBlob, StringOrBlob) | Returns whether the two unions hold the same value. |
| implicit operator StringOrBlob(Blob) | Converts a blob to the union. |
| implicit operator StringOrBlob(string) | Converts a string to the union. |
| operator !=(StringOrBlob, StringOrBlob) | Returns whether the two unions hold different values. |
operator ==(StringOrBlob, StringOrBlob)
ClipboardItem.csReturns whether the two unions hold the same value.
public static bool operator ==(StringOrBlob left, StringOrBlob right)op_Implicit overloads
implicit operator StringOrBlob(Blob)
ClipboardItem.csConverts a blob to the union.
public static implicit operator StringOrBlob(Blob value)implicit operator StringOrBlob(string)
ClipboardItem.csConverts a string to the union.
public static implicit operator StringOrBlob(string value)operator !=(StringOrBlob, StringOrBlob)
ClipboardItem.csReturns whether the two unions hold different values.
public static bool operator !=(StringOrBlob left, StringOrBlob right)