Kentico 9.0 API Reference
Kentico 9.0 API Reference
Namespaces
CMS.Helpers
EnumStringRepresentationExtensions Class
EnumStringRepresentationExtensions Methods
ToStringRepresentation Method
ToStringRepresentation Method (Enum)
ToStringRepresentation(TEnum) Method (TEnum)
EnumStringRepresentationExtensions
ToStringRepresentation Method (Enum)
Converts the enum value to it's string representation.
Namespace:
CMS.Helpers
Assembly:
CMS.Helpers (in CMS.Helpers.dll) Version: 9.0.0
Syntax
C#
Copy
public
static
string
ToStringRepresentation
(
this
Enum
value
)
Parameters
value
Type:
System
Enum
Enum value
Return Value
Type:
String
Returns the string representation of the enum value if it is specified using the
EnumStringRepresentationAttribute
. Otherwise returns the enum field name.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Enum
. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic)
or
Extension Methods (C# Programming Guide)
.
See Also
Reference
EnumStringRepresentationExtensions Class
ToStringRepresentation Overload
CMS.Helpers Namespace
Copyright (c) 2015 Kentico Software
Send comments on this topic to
support@kentico.com