SqlCeParameterCollection.Count Property
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
'Usage
Dim instance As SqlCeParameterCollection
Dim value As Integer
value = instance.Count
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();
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .
Platforms
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows XP Professional x64 Edition, Windows XP SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Version Information
.NET Compact Framework
Supported in: 2.0, 1.0
See Also
Reference
SqlCeParameterCollection Class
SqlCeParameterCollection Members
System.Data.SqlServerCe Namespace