Content Studio Web Content Management System
Assembly: ContentStudio.Site.Controls (in ContentStudio.Site.Controls.dll) Version: 5.7.5016.0 (5.7.5016.0)
The parsed value as an enumeration
[This is preliminary documentation and is subject to change.]
Parses a string as a specified enum-type with the option to return a default value.
Namespace: ContentStudio.Site.Controls
Assembly: ContentStudio.Site.Controls (in ContentStudio.Site.Controls.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
Parameters
- value
- Type: SystemString
The value to parse. This parameter can be null or Empty to return the default value. - defaultValue
- Type: T
A default value to return if value is null or Empty or is cannot be parsed.
Type Parameters
- T
- The type of enum to return
Return Value
Type: TThe parsed value as an enumeration
Exceptions
Exception | Condition |
---|---|
ArgumentException | Type parameter T is not an enum. |
See Also