Table of Contents

Class ValueFormatAttribute

Namespace
CapyKit.Attributes
Assembly
CapyKit.dll

Custom attribute for formatting values in a specific way.

[AttributeUsage(AttributeTargets.Property)]
public class ValueFormatAttribute : Attribute
Inheritance
ValueFormatAttribute
Inherited Members
Extension Methods

Constructors

ValueFormatAttribute()

Default constructor. Initializes a new instance of the ValueFormatAttribute class with an empty format string.

public ValueFormatAttribute()

ValueFormatAttribute(string)

Constructor. Initializes a new instance of the ValueFormatAttribute class with the specified format string.

public ValueFormatAttribute(string format)

Parameters

format string

The format string used to format the value.

Properties

Format

Gets or sets the format to use for formatting the value.

public string Format { get; }

Property Value

string

The format string used to format the value.

Methods

GetFormatParameterizedString(int)

Gets a parameterized formatted string for the specified index.

public string GetFormatParameterizedString(int index = 0)

Parameters

index int

(Optional) Zero-based index of the item in the string to format.

Returns

string

A formatted string with the specified index and format.