Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - .NET Programming » UltraLite .NET 2.0 API Reference » ULParameter class » ULParameter constructors

ULParameter() constructor Next Page

ULParameter(String, Object) constructor


Initializes a ULParameter object with the specified parameter name and value.

Syntax

Visual Basic

Public Sub New( _
ByVal parameterName As String, _
ByVal value As Object _
)

C#

public ULParameter(
string parameterName,
object value
);

Parameters
Remarks

Because of the special treatment of the 0 and 0.0 constants and the way overloaded methods are resolved, it is highly recommended that you explicitly cast constant values to type object when using this constructor.

Example

The following code creates a ULParameter with the value 0 and adds it to a ULCommand called cmd.

' Visual Basic
cmd.Parameters.Add( New ULParameter( "", CType( 0, Object ) ) )

// C#
cmd.Parameters.Add( new ULParameter( "", (object)0 ) );
See also