Class FormattedPart
- Namespace
- Utils.Expressions
- Assembly
- Utils.dll
Represents a formatted part of an interpolated string, containing an expression and optional format/alignment specifications.
public class FormattedPart : IInterpolatedStringPart
- Inheritance
-
FormattedPart
- Implements
- Inherited Members
- Extension Methods
Constructors
FormattedPart(string)
Initializes a new instance of FormattedPart with the specified expression text.
public FormattedPart(string expressionText)
Parameters
expressionTextstringThe text of the expression within the interpolated string.
Properties
Alignment
Gets or sets the alignment specification for this part (if any).
public int? Alignment { get; init; }
Property Value
- int?
ExpressionText
Gets the expression text of this formatted part.
public string ExpressionText { get; }
Property Value
Format
Gets or sets the format string for this part (if any).
public string? Format { get; init; }