TrustedHtmlOrString Struct
A value of the (TrustedHTML or DOMString) union type, the arguments of Document.Write.
public readonly struct TrustedHtmlOrStringProperties
| Name | Description |
|---|---|
| StringValue | Gets the string value, or null when the union holds a trusted HTML value. |
| TrustedHtml | Gets the trusted HTML value, or null when the union holds a string. |
StringValue
Document.DynamicMarkupInsertion.csTrustedHtml
Document.DynamicMarkupInsertion.csGets the trusted HTML value, or null when the union holds a string.
public TrustedHtml? TrustedHtml { get; }Property value
Methods
| Name | Description |
|---|---|
| FromString(string) | Creates the union from a string. |
| FromTrustedHtml(TrustedHtml) | Creates the union from a trusted HTML value. |
FromString(string)
Document.DynamicMarkupInsertion.csCreates the union from a string.
public static TrustedHtmlOrString FromString(string value)FromTrustedHtml(TrustedHtml)
Document.DynamicMarkupInsertion.csCreates the union from a trusted HTML value.
public static TrustedHtmlOrString FromTrustedHtml(TrustedHtml value)Operators
| Name | Description |
|---|---|
| implicit operator TrustedHtmlOrString(TrustedHtml) | Converts a trusted HTML value to the union type. |
| implicit operator TrustedHtmlOrString(string) | Converts a string to the union type. |
op_Implicit overloads
implicit operator TrustedHtmlOrString(TrustedHtml)
Document.DynamicMarkupInsertion.csConverts a trusted HTML value to the union type.
public static implicit operator TrustedHtmlOrString(TrustedHtml value)implicit operator TrustedHtmlOrString(string)
Document.DynamicMarkupInsertion.csConverts a string to the union type.
public static implicit operator TrustedHtmlOrString(string value)