StringSyntaxAttribute 类

定义

指定字符串中使用的语法。

public ref class StringSyntaxAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false, Inherited=false)]
public sealed class StringSyntaxAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false, Inherited=false)>]
type StringSyntaxAttribute = class
    inherit Attribute
Public NotInheritable Class StringSyntaxAttribute
Inherits Attribute
继承
StringSyntaxAttribute
属性

构造函数

名称 说明
StringSyntaxAttribute(String, Object[])

使用 StringSyntaxAttribute 使用的语法标识符初始化。

StringSyntaxAttribute(String)

使用 StringSyntaxAttribute 使用的语法标识符初始化。

字段

名称 说明
CompositeFormat

包含字符串格式的复合格式的字符串的语法标识符。

CSharp

指定字符串中使用的语法。

DateOnlyFormat

包含日期格式说明符的字符串的语法标识符。

DateTimeFormat

包含日期和时间格式说明符的字符串的语法标识符。

EnumFormat

包含 Enum 格式说明符的字符串的语法标识符。

FSharp

指定字符串中使用的语法。

GuidFormat

包含 Guid 格式说明符的字符串的语法标识符。

Json

包含 JavaScript 对象表示法(JSON)的字符串的语法标识符。

NumericFormat

包含数值格式说明符的字符串的语法标识符。

Regex

包含正则表达式的字符串的语法标识符。

TimeOnlyFormat

包含时间格式说明符的字符串的语法标识符。

TimeSpanFormat

包含 TimeSpan 格式说明符的字符串的语法标识符。

Uri

包含 URI 的字符串的语法标识符。

VisualBasic

指定字符串中使用的语法。

Xml

包含 XML 的字符串的语法标识符。

属性

名称 说明
Arguments

获取与所使用的特定语法关联的可选参数。

Syntax

获取使用的语法的标识符。

TypeId

在派生类中实现时,获取此 Attribute的唯一标识符。

(继承自 Attribute)

方法

名称 说明
Equals(Object)

返回一个值,该值指示此实例是否等于指定对象。

(继承自 Attribute)
GetHashCode()

返回此实例的哈希代码。

(继承自 Attribute)
GetType()

获取当前实例的 Type

(继承自 Object)
IsDefaultAttribute()

在派生类中重写时,指示此实例的值是否为派生类的默认值。

(继承自 Attribute)
Match(Object)

在派生类中重写时,返回一个值,该值指示此实例是否等于指定对象。

(继承自 Attribute)
MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
ToString()

返回一个表示当前对象的字符串。

(继承自 Object)

适用于