StringExtensionsGetConstantValue Method |
Decodes an encoded constant and returns its value.
Namespace:
Aloe.EnterpriseOne.Model.Core.Expressions
Assembly:
Aloe.EnterpriseOne.Model (in Aloe.EnterpriseOne.Model.dll) Version: 20.1.3.5
Syntaxpublic static Object GetConstantValue(
this string encodedConstant
)
<ExtensionAttribute>
Public Shared Function GetConstantValue (
encodedConstant As String
) As Object
public:
[ExtensionAttribute]
static Object^ GetConstantValue(
String^ encodedConstant
)
[<ExtensionAttribute>]
static member GetConstantValue :
encodedConstant : string -> Object
Parameters
- encodedConstant
- Type: SystemString
The encoded encodedConstant.
Return Value
Type:
ObjectThe value of the encodedConstant.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
String. 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).
Remarks
Constants are encoded in the following format, shown with examples:
- null (case insensitive) - Returns null.
- 'some-string-value' - Returns the string 'some-string-value'.
- 2017-04-27 - Returns the date Apr 27, 2017.
- #2017-4-27# - Returns the date Apr 27, 2017.
- 103 - Returns the int 103.
- 103.0 - Returns the decimal 103.0.
- true/false (case insensitive) - Returns the boolean true or false.
- 9E68FC57-7C39-40EE-ADE1-63138B9186FD - Returns the specified Guid.
- {9E68FC57-7C39-40EE-ADE1-63138B9186FD} - Returns the specified Guid.
- Anything else - Returns the value, treated as literal string.
See Also