I18N.DotNet v1.3.1
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Properties | List of all members
PlainString Class Reference

Represents just a string. This class is used to allow interpolated strings to preferably be passed as FormattableString instead of string to methods that overload both types. More...

Public Member Functions

 PlainString (string value)
 Default constructor. More...
 

Static Public Member Functions

static implicit operator PlainString (string value)
 Converts a string value to a PlainString. More...
 
static implicit operator PlainString (FormattableString value)
 Converts a FormattableString value to a PlainString. More...
 

Properties

string Value [get]
 

Detailed Description

Represents just a string. This class is used to allow interpolated strings to preferably be passed as FormattableString instead of string to methods that overload both types.

Constructor & Destructor Documentation

◆ PlainString()

PlainString ( string  value)

Default constructor.

Member Function Documentation

◆ operator PlainString() [1/2]

static implicit operator PlainString ( FormattableString  value)
static

Converts a FormattableString value to a PlainString.

This implicit operator is needed to avoid FormattableString values to be automatically converted to string and then to PlainString when resolving parameter overloads.

Parameters
valueValue.
Exceptions
InvalidOperationExceptionAlways thrown.

◆ operator PlainString() [2/2]

static implicit operator PlainString ( string  value)
static

Converts a string value to a PlainString.

Parameters
valueValue.

Property Documentation

◆ Value

string Value
get

Value of the string.