SqlCommand.Paremeters is a collectoin of parameters, more specifically it's an IList. An IList is like an array, just with a more abstract interface. It describes a list of items... lists can be emptied. When you want to empty a list you call the 'Clear' function of the collection:
So it sounds to me that they want to clear out all the parameters stored in the parameters collection of that sql command. Maybe to ensure that the parameters from any previous calls to the database aren't accidentally sent again.
Re: Question why do we have to use .Parameters.Clear() ?
Posted 01 March 2012 - 08:12 AM
If you don't remove them from the collection and you try to use them again, it will tell you that they already belong to a collection and you can't use the parameter again (for instance, if you want to add it to another command and use it again.