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 (Decimal, Int32, IFormatProvider)

AFValue.DisplayValue Method (Decimal, Int32, IFormatProvider)

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFValue.DisplayValue Method (Decimal, Int32, IFormatProvider)
Displays the Decimal value based upon the specified number of display digits.

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

Syntax

public static string DisplayValue(
	decimal value,
	int displayDigits,
	IFormatProvider provider = null
)
Public Shared Function DisplayValue ( 
	value As Decimal,
	displayDigits As Integer,
	Optional provider As IFormatProvider = Nothing
) As String

Dim value As Decimal
Dim displayDigits As Integer
Dim provider As IFormatProvider
Dim returnValue As String

returnValue = AFValue.DisplayValue(value, 
	displayDigits, provider)
public:
static String^ DisplayValue(
	Decimal value, 
	int displayDigits, 
	IFormatProvider^ provider = nullptr
)
static member DisplayValue : 
        value : decimal * 
        displayDigits : int * 
        ?provider : IFormatProvider 
(* Defaults:
        let _provider = defaultArg provider null
*)
-> string 

Parameters

value
Type: SystemDecimal
The value to be converted to a display value based upon the displayDigits parameter.
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.

Return Value

Type: String
Returns the string representation of the value as specified by the rules for displayDigits and formated by the provider.

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