FormattableString.ArgumentCount 属性

定义

获取要格式化的参数数量。Gets the number of arguments to be formatted.

public:
 abstract property int ArgumentCount { int get(); };
public abstract int ArgumentCount { get; }
member this.ArgumentCount : int
Public MustOverride ReadOnly Property ArgumentCount As Integer

属性值

Int32

要设置格式的参数的数目。The number of arguments to be formatted.

注解

可以从方法返回的对象数组中检索参数 GetArguments ,也可以从方法中按索引号单独检索参数 GetArgumentThe arguments can be retrieved from the object array returned by the GetArguments method, or they can be retrieved individually by index number from the GetArgument method. 各个参数的索引范围为0到-1 之间的值 ArgumentCountThe indexes of individual arguments range from zero to ArgumentCount - 1.

适用于