共用方式為


SPFieldCurrency.GetFieldValueAsText Method (Double, CultureInfo, Int32, SPNumberFormatTypes)

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

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

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

returnValue = SPFieldCurrency.GetFieldValueAsText(data, _
    culture, currencyLocaleId, displayFormat)
public static string GetFieldValueAsText(
    double data,
    CultureInfo culture,
    int currencyLocaleId,
    SPNumberFormatTypes displayFormat
)

Parameters

  • data
    Type: System.Double

    A System.Double object that represents the value to convert to HTML format.

  • culture
    Type: System.Globalization.CultureInfo

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

  • currencyLocaleId
    Type: System.Int32

    A 32-bit integer that specifies the locale ID of the field.

Return Value

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

See Also

Reference

SPFieldCurrency Class

SPFieldCurrency Members

GetFieldValueAsText Overload

Microsoft.SharePoint Namespace