StringSyntaxAttribute 类  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指定字符串中使用的语法。
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 AttributePublic NotInheritable Class StringSyntaxAttribute
Inherits Attribute- 继承
- 属性
构造函数
| StringSyntaxAttribute(String) | StringSyntaxAttribute使用所用语法的标识符初始化 。 | 
| StringSyntaxAttribute(String, Object[]) | StringSyntaxAttribute使用所用语法的标识符初始化 。 | 
字段
| CompositeFormat | 包含用于字符串格式的复合格式的字符串的语法标识符。 | 
| DateOnlyFormat | 包含日期格式说明符的字符串的语法标识符。 | 
| DateTimeFormat | 包含日期和时间格式说明符的字符串的语法标识符。 | 
| EnumFormat | 包含 Enum 格式说明符的字符串的语法标识符。 | 
| GuidFormat | 包含 Guid 格式说明符的字符串的语法标识符。 | 
| Json | 包含 JavaScript 对象表示法的字符串的语法标识符 (JSON) 。 | 
| NumericFormat | 包含数值格式说明符的字符串的语法标识符。 | 
| Regex | 包含正则表达式的字符串的语法标识符。 | 
| TimeOnlyFormat | 包含时间格式说明符的字符串的语法标识符。 | 
| TimeSpanFormat | 包含 TimeSpan 格式说明符的字符串的语法标识符。 | 
| Uri | 包含 URI 的字符串的语法标识符。 | 
| 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) |