Share via


SPFieldNumber.GetFieldValueAsText method (Double, CultureInfo, Boolean, SPNumberFormatTypes)

Returns the field value as plain text based on the specified data, culture information, Boolean value, and number format.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Function GetFieldValueAsText ( _
    data As Double, _
    culture As CultureInfo, _
    showAsPercentage As Boolean, _
    displayFormat As SPNumberFormatTypes _
) As String
'Usage
Dim data As Double
Dim culture As CultureInfo
Dim showAsPercentage As Boolean
Dim displayFormat As SPNumberFormatTypes
Dim returnValue As String

returnValue = SPFieldNumber.GetFieldValueAsText(data, _
    culture, showAsPercentage, displayFormat)
public static string GetFieldValueAsText(
    double data,
    CultureInfo culture,
    bool showAsPercentage,
    SPNumberFormatTypes displayFormat
)

Parameters

  • data
    Type: System.Double

    A System.Double object that represents the value to convert to plain text.

  • culture
    Type: System.Globalization.CultureInfo

    A System.Globalization.CultureInfo object that contains information about the specific culture represented through the field.

  • showAsPercentage
    Type: System.Boolean

    true to display field values as a percentage; otherwise, false.

Return value

Type: System.String
A string that contains the value as plain text, for example, without HTML.

See also

Reference

SPFieldNumber class

SPFieldNumber members

GetFieldValueAsText overload

Microsoft.SharePoint namespace