Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
用指定参数名和值初始化 ULParameter 对象。
Public Sub New(ByVal parameterName As String, ByVal value As Object)
public ULParameter(string parameterName, object value)
parameterName 参数的名称。对于未命名参数,请使用一个空字符串 ("") 或空值引用(在 Visual Basic 中为 Nothing)作为其值。在 UltraLite.NET 中,参数名不由 ULCommand 来使用。
value 要作为参数值的 System.Object。
鉴于系统对 0 和 0.0 常量的特殊处理方法以及对重载方法的解析方式,我们强烈建议您在使用此构造函数时显示地将常量值转换为类型对象。
以下代码将创建一个值为 0 的 ULParameter 对象,并将其添加至名为 cmd 的 ULCommand 中。
' Visual Basic cmd.Parameters.Add( New ULParameter( "", CType( 0, Object ) ) )
以下代码为 C# 语言等效代码:
// C# cmd.Parameters.Add( new ULParameter( "", (object)0 ) );