Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

struct System.​Runtime.​CompilerServices.​DefaultInterpolatedStringHandler

Assembly: System.Runtime

Provides a handler used by the language compiler to process interpolated strings into <see cref="T:System.String" /> instances.

Properties

public ReadOnlySpan<​char>
Text
Gets a span of the characters appended to the handler.

Methods

public void
AppendFormatted​(object value, int alignment = 0, string format = null)
Writes the specified value to the handler.
value The value to write.
alignment Minimum number of characters that should be written for this value. If the value is negative, it indicates left-aligned and the required minimum is the absolute value.
format The format string.
public void
AppendFormatted​(ReadOnlySpan<​char> value)
Writes the specified character span to the handler.
value The span to write.
public void
AppendFormatted​(ReadOnlySpan<​char> value, int alignment = 0, string format = null)
Writes the specified string of chars to the handler.
value The span to write.
alignment Minimum number of characters that should be written for this value. If the value is negative, it indicates left-aligned and the required minimum is the absolute value.
format The format string.
public void
AppendFormatted​(string value)
Writes the specified value to the handler.
value The value to write.
public void
AppendFormatted​(string value, int alignment = 0, string format = null)
Writes the specified value to the handler.
value The value to write.
alignment Minimum number of characters that should be written for this value. If the value is negative, it indicates left-aligned and the required minimum is the absolute value.
format The format string.
public void
AppendFormatted​(T value)
Writes the specified value to the handler.
value The value to write.
public void
AppendFormatted​(T value, int alignment)
Writes the specified value to the handler.
value The value to write.
alignment Minimum number of characters that should be written for this value. If the value is negative, it indicates left-aligned and the required minimum is the absolute value.
public void
AppendFormatted​(T value, int alignment, string format)
Writes the specified value to the handler.
value The value to write.
alignment Minimum number of characters that should be written for this value. If the value is negative, it indicates left-aligned and the required minimum is the absolute value.
format The format string.
public void
AppendFormatted​(T value, string format)
Writes the specified value to the handler.
value The value to write.
format The format string.
public void
AppendLiteral​(string value)
Writes the specified string to the handler.
value The string to write.
public void
Clear​()
Clears the handler.
public string
ToString​()
Gets the built <see cref="T:System.String" /> .
Returns The built string.
public string
ToStringAndClear​()
Gets the built <see cref="T:System.String" /> and clears the handler.
Returns The built string.
public bool
Equals​(object obj)
Inherited from ValueType
Indicates whether this instance and a specified object are equal.
Returns <see langword="true" /> if <paramref name="obj" /> and this instance are the same type and represent the same value; otherwise, <see langword="false" /> .
obj The object to compare with the current instance.
public int
GetHashCode​()
Inherited from ValueType
Returns the hash code for this instance.
Returns A 32-bit signed integer that is the hash code for this instance.
protected void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public Type
GetType​()
Inherited from object
Gets the <see cref="T:System.Type" /> of the current instance.
Returns The exact runtime type of the current instance.
protected object
MemberwiseClone​()
Inherited from object
Creates a shallow copy of the current <see cref="T:System.Object" /> .
Returns A shallow copy of the current <see cref="T:System.Object" /> .