Share via


DataFunctions.Number Method (PIA)

Use this method to convert an int to its equivalent string representation, based on the default or specified locale.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop
…
Public Function Number(lNumber As Integer,
 vtLocale As Object) As Object

[C#]

using Microsoft.CommerceServer.Interop;
…
public object Number(intlNumber,
 objectvtLocale);

Parameters

[Visual Basic .NET]

  • lNumber
    An Integer that contains the number to convert to a string.
  • vtLocale
    An Object that specifies the locale to use to convert the number to a string. If this parameter is not specified, the value of the Locale property of the DataFunctions object is used.

[C#]

  • lNumber
    A long that contains the number to convert to a string.
  • vtLocale
    An object that specifies the locale to use to convert the number to a string. If you want the value of the Locale property of the DataFunctions object to be used, pass Type.Missing for this parameter.

Return Values

[Visual Basic .NET] If this method completes successfully, it returns an Object that contains the string representation of the specified number; otherwise, Null is returned.

[C#] This method returns an object containing the string representation of the specified number.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

Example

[Visual Basic .NET]

Dim Result As Object
DataFunctions df = New DataFunctions()
' Set Locale to USA
myLocale = 1033
df.Locale = myLocale
Result = df.Number(9999999.99, myLocale)
Response.Write("USA: " & Result & "<P>")

' Set Locale to France
myLocale = 1036
df.Locale = myLocale
Result = df.Number(9999999, myLocale)
Response.Write("France: " & Result & "<P>")

[C#]

No example available.

Requirements

Namespace: Microsoft.CommerceServer.Interop

Platforms: Windows 2000, Windows Server 2003

Assembly: mscsasphelplib (in mscsasphelplib.dll)

See Also

DataFunctions Class

DataFunctions.Locale

DataFunctions.ConvertNumberString

Copyright © 2005 Microsoft Corporation.
All rights reserved.