Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFValue.DisplayValue Method (Int32, IFormatProvider, Boolean)

AFValue.DisplayValue Method (Int32, IFormatProvider, Boolean)

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFValue.DisplayValue Method (Int32, IFormatProvider, Boolean)
Displays the Value based upon the value's Type with the option to add the value's UOM abbreviation.

Namespace:  OSIsoft.AF.Asset
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public string DisplayValue(
	int displayDigits,
	IFormatProvider provider = null,
	bool addUOMAbbreviation = true
)
Public Function DisplayValue ( 
	displayDigits As Integer,
	Optional provider As IFormatProvider = Nothing,
	Optional addUOMAbbreviation As Boolean = true
) As String

Dim instance As AFValue
Dim displayDigits As Integer
Dim provider As IFormatProvider
Dim addUOMAbbreviation As Boolean
Dim returnValue As String

returnValue = instance.DisplayValue(displayDigits, 
	provider, addUOMAbbreviation)
public:
String^ DisplayValue(
	int displayDigits, 
	IFormatProvider^ provider = nullptr, 
	bool addUOMAbbreviation = true
)
member DisplayValue : 
        displayDigits : int * 
        ?provider : IFormatProvider * 
        ?addUOMAbbreviation : bool 
(* Defaults:
        let _provider = defaultArg provider null
        let _addUOMAbbreviation = defaultArg addUOMAbbreviation true
*)
-> string 

Parameters

displayDigits
Type: SystemInt32
A zero or positive number indicates the number of digits to the right of the decimal point. A negative number indicates the number of significant digits to display.
provider (Optional)
Type: SystemIFormatProvider
An object that supplies culture-specific formatting information. If , then the NumberFormatInfo associated with the current culture is used.
addUOMAbbreviation (Optional)
Type: SystemBoolean
If , the value's UOM abbreviation is added to the returned display value the value's UOM is defined.

Return Value

Type: String
Returns the string representation of the Value as specified by the rules for displayDigits, the value's Type, and formated by the provider. Optionally, the value's UOM abbreviation is added.

Remarks

This method encapsulates the rules for converting a value to be displayed based upon the specified number of display digits. The value for the displayDigits parameter is normally obtained from the attribute's DisplayDigits property.

Note Note
If the value is not a Single, Double, or Decimal, then the displayDigits parameter is not used to format the returned display value.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10

See Also

In This Topic
TitleResults for “How to create a CRG?”Also Available in