Share via


DataFunctions.ConvertFloatString Method (PIA)

Use this method to convert a floating-point number represented as a string to a double object, based on the default or specified locale.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop
…
Public Function ConvertFloatString(vtNum As Object,
 Optional vtLocale As Object) As Object

[C#]

using Microsoft.CommerceServer.Interop;
…
public object ConvertFloatString(objectvtNum,
  objectvtLocale);

Parameters

[Visual Basic .NET]

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

[C#]

  • vtNum
    An object that contains a string representation of the floating-point number to convert.
  • vtLocale
    An object that specifies the locale to use to convert the 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 a double Object that contains the converted number; otherwise, Null is returned.

[C#] This method returns an object containing the converted floating-point 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]

' Converts float using US and France locales
' oSourceFloat is an Object containing a float string
Dim Result As Object
DataFunctions df = New DataFunctions()
df.Locale = 1036
Result = df.ConvertFloatString(oSourceFloat)
Response.Write("France: " & Result & "<P>")
df.Locale = 1033
Result = df.ConvertFloatString(oSourceFloat)
Response.Write("USA: " & Result)

[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.Float

DataFunctions.ValidateFloat

Copyright © 2005 Microsoft Corporation.
All rights reserved.