Table of Contents

Class ExVectorUtil

Namespace
Zyl.VectorTraits
Assembly
VectorTraits.dll

Some utility functions are provided for ExType vectors. For example, the Format function can be used to safely output an ExType vector (为ExType 向量, 提供了一些 的工具函数. 例如用 Format 函数可以安全的输出ExType 向量).

public static class ExVectorUtil
Inheritance
ExVectorUtil
Inherited Members

Remarks

When a vector type contains an ExType, an exception will occur if it is format as a string. Using methods of this class, the format can be done safely. (当向量类型里含有 ExType 时, 若直接使用字符串格式化, 会有异常. 而使用本类的办法后, 能安全地进行格式化).

Methods

Format(IFormatProvider?, string, object?)

Replaces the format item or items in a specified string with the string representation of the corresponding object. A parameter supplies culture-specific formatting information.

Format(IFormatProvider?, string, object?, object?)

Replaces the format items in a string with the string representation of two specified objects. A parameter supplies culture-specific formatting information.

Format(IFormatProvider?, string, object?, object?, object?)

Replaces the format items in a string with the string representation of three specified objects. An parameter supplies culture-specific formatting information.

Format(IFormatProvider?, string, params object?[])

Replaces the format items in a string with the string representations of corresponding objects in a specified array. A parameter supplies culture-specific formatting information.

Format(IFormatProvider?, CompositeFormat, params object?[])

Replaces the format item or items in a CompositeFormat with the string representation of the corresponding objects in the specified format.

Format(IFormatProvider?, CompositeFormat, ReadOnlySpan<object?>)

Replaces the format item or items in a CompositeFormat with the string representation of the corresponding objects in the specified format.

Format(string, object?)

Replaces one or more format items in a string with the string representation of a specified object.

Format(string, object?, object?)

Replaces the format items in a string with the string representation of two specified objects.

Format(string, object?, object?, object?)

Replaces the format items in a string with the string representation of three specified objects.

Format(string, params object?[])

Replaces the format item in a specified string with the string representation of a corresponding object in a specified array.

Format<TArg0>(IFormatProvider?, CompositeFormat, TArg0)

Replaces the format item or items in a CompositeFormat with the string representation of the corresponding objects in the specified format.

Format<T>(T)

Returns a string that represents the current object. It is used to replace the ToString method for vector types and no longer throws exceptions (返回表示当前对象的字符串. 用于替代向量类型的 ToString 方法. 它用于替换向量类型的 ToString 方法,不再抛出异常).

Format<TArg0, TArg1>(IFormatProvider?, CompositeFormat, TArg0, TArg1)

Replaces the format item or items in a CompositeFormat with the string representation of the corresponding objects in the specified format.

Format<TArg0, TArg1, TArg2>(IFormatProvider?, CompositeFormat, TArg0, TArg1, TArg2)

Replaces the format item or items in a CompositeFormat with the string representation of the corresponding objects in the specified format.

ToString(FormattableString)

Safely convert interpolated string to string. Based on FormattableString (安全地将内插字符串转为 string. 基于 FormattableString).

ToString(IFormatProvider?, FormattableString)

Safely convert interpolated string to string, with provider parameter. Based on FormattableString (安全地将内插字符串转为 string, 带有 provider 参数. 基于 FormattableString).