Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Diagnostics.​CodeAnalysis.​StringSyntaxAttribute
Assembly: System.Runtime
Inheritance: object → Attribute → StringSyntaxAttribute
Specifies the syntax used in a string.
Fields and Constants
public const
string
CompositeFormat
The syntax identifier for strings containing composite formats for string formatting.
public const
string
DateOnlyFormat
The syntax identifier for strings containing date format specifiers.
public const
string
DateTimeFormat
The syntax identifier for strings containing date and time format specifiers.
public const
string
EnumFormat
The syntax identifier for strings containing <see cref="T:System.Enum" /> format specifiers.
public const
string
GuidFormat
The syntax identifier for strings containing <see cref="T:System.Guid" /> format specifiers.
public const
string
Json
The syntax identifier for strings containing JavaScript Object Notation (JSON).
public const
string
NumericFormat
The syntax identifier for strings containing numeric format specifiers.
public const
string
Regex
The syntax identifier for strings containing regular expressions.
public const
string
TimeOnlyFormat
The syntax identifier for strings containing time format specifiers.
public const
string
TimeSpanFormat
The syntax identifier for strings containing <see cref="T:System.TimeSpan" /> format specifiers.
public const
string
Uri
The syntax identifier for strings containing URIs.
public const
string
Xml
The syntax identifier for strings containing XML.
Properties
public
object[]
Arguments
Gets the optional arguments associated with the specific syntax employed.
public
string
Syntax
Gets the identifier of the syntax used.
public
object
TypeId
When implemented in a derived class, gets a unique identifier for this <see cref="T:System.Attribute" /> .
Methods
public
bool
Equals​(object obj)
Inherited from Attribute
obj
An <see cref="T:System.Object" /> to compare with this instance or <see langword="null" /> .
Returns <see langword="true" /> if <paramref name="obj" /> and this instance are of the same type and have identical field values; otherwise, <see langword="false" /> .
Returns a value that indicates whether this instance is equal to a specified object.
public
int
GetHashCode​()
Inherited from Attribute
Returns A 32-bit signed integer hash code.
Returns the hash code for this instance.
public
bool
IsDefaultAttribute​()
Inherited from Attribute
Returns <see langword="true" /> if this instance is the default attribute for the class; otherwise, <see langword="false" /> .
When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.
public
bool
Match​(object obj)
Inherited from Attribute
obj
An <see cref="T:System.Object" /> to compare with this instance of <see cref="T:System.Attribute" /> .
Returns <see langword="true" /> if this instance equals <paramref name="obj" /> ; otherwise, <see langword="false" /> .
When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.
protected
void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public
Type
GetType​()
Inherited from object
Returns The exact runtime type of the current instance.
Gets the <see cref="T:System.Type" /> of the current instance.
protected
object
MemberwiseClone​()
Inherited from object
Returns A shallow copy of the current <see cref="T:System.Object" /> .
Creates a shallow copy of the current <see cref="T:System.Object" /> .
public
string
ToString​()
Inherited from object
Returns A string that represents the current object.
Returns a string that represents the current object.