Click or drag to resize
Constant Class
Represents a constant value in the schema.
Inheritance Hierarchy
SystemObject
  Bloomberglp.BlpapiConstant

Namespace:  Bloomberglp.Blpapi
Assembly:  Bloomberglp.Blpapi (in Bloomberglp.Blpapi.dll) Version: 3.12.5.1
Syntax
public abstract class Constant

The Constant type exposes the following members.

Constructors
  NameDescription
Protected methodConstant
Initializes a new instance of the Constant class
Top
Properties
  NameDescription
Public propertyDatatype
Gets the Datatype used to represent the value of this Constant.
Public propertyDescription
Gets a String containing a human readable description of this Constant.
Public propertyName
Gets the symbolic name of the constant.
Public propertyStatus
Gets the status of this Constant.
Public propertyUserData
Gets or sets the user data associated with this Constant.
Top
Methods
  NameDescription
Public methodGetValueAsChar
Gets the value of this Constant as a char if it can be converted.
Public methodGetValueAsDate Obsolete.
Gets the value of this Constant as a Datetime containing only a date part if it can be converted.
Public methodGetValueAsDatetime
Gets the value of this Constant as a Datetime if it can be converted.
Public methodGetValueAsFloat32
Gets the value of this Constant as a Float32 if it can be converted.
Public methodGetValueAsFloat64
Gets the value of this Constant as a Float64 if it can be converted.
Public methodGetValueAsInt32
Gets the value of this Constant as an Int32 if it can be converted.
Public methodGetValueAsInt64
Gets the value of this Constant as an Int64 if it can be converted.
Public methodGetValueAsString
Gets the value of this Constant as a string if it can be converted.
Public methodGetValueAsTime Obsolete.
Gets the value of this Constant as a Datetime containing only a time part if it can be converted.
Public methodPrint(Stream)
Prints this constant into 'output'.
Public methodPrint(TextWriter)
Prints this constant into 'writer'.
Top
Remarks

Constants can be any of the following DataTypes: BOOL, CHAR, BYTE, INT32, INT64, FLOAT32, FLOAT64, STRING, DATE, TIME, DATETIME. As well as the constants value this class also provides access to the symbolic name, description and status of the constant.

Constants are read-only and always created by the API, never by the application.

Thread Safety
Constant is safe for multithreaded operations except for SetUserData and Userdata methods.
See Also