Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the number of SqlCeParameter objects in the collection.
Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in system.data.sqlserverce.dll)
Syntax
'Declaration
Public Overrides ReadOnly Property Count As Integer
public override int Count { get; }
public:
virtual property int Count {
int get () override;
}
/** @property */
public int get_Count ()
public override function get Count () : int
Property Value
The number of SqlCeParameter objects in the collection.
Example
The following example adds SqlCeParameter objects to SqlCeParameterCollection, displays the names of the SqlCeParameter objects, and then clears the collection. This example assumes that a SqlCeCommand has already been created.
cmd.Parameters.Add("@ID", SqlDbType.Int)
cmd.Parameters.Add("@Description", SqlDbType.NVarChar)
Dim myParamList As String = ""
Dim i As Integer
For i = 0 To cmd.Parameters.Count
myParamList &= " " & cmd.Parameters(i).ParameterName & vbLf
Next i
MessageBox.Show("myChildren:" & vbLf & myParamList)
cmd.Parameters.Clear()
cmd.Parameters.Add("@ID", SqlDbType.Int);
cmd.Parameters.Add("@Description", SqlDbType.NVarChar);
string myParamList = "";
for (int i = 0; i < cmd.Parameters.Count; i++)
{
myParamList += " " + cmd.Parameters[i].ParameterName + "\n";
}
MessageBox.Show("myChildren:\n" + myParamList);
cmd.Parameters.Clear();
Thread Safety
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows Vista, Windows Mobile 5.0, Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Mobile 2003 for Pocket PC, Windows CE 5.0
Version Information
.NET Framework and NET Compact Framework
Supported in 3.5
.NET Framework
Supported in 3.0
.NET Compact Framework and .Net Framework
Supported in 2.0
See Also
Reference
SqlCeParameterCollection Class
SqlCeParameterCollection Members
System.Data.SqlServerCe Namespace