explicit operator TypedConstant(string?)
Converts a string value into a TypedConstant of type string. A null value gives a
null constant of type string.
Declaration
public static explicit operator TypedConstant(string? value)Parameters
| Type | Name | Description |
|---|---|---|
| string | value |
Returns
| Type | Description |
|---|---|
| TypedConstant |
Remarks
The conversion is explicit, unlike the conversions from the other primitive types. An implicit conversion would also apply to the
null literal, so that an expression such as condition ? constant : null would have the type TypedConstant
instead of a nullable TypedConstant.