How do I use MySqlParameterCollection.AddRange

advertisements

I've installed Connector/NET 6.5.4. In VisualStutio IntelliSense suggests a method called MySqlParameterCollection.AddRange, however there's no documentation available so I don't know how to use it. I've searched here and found nothing.

How do I use this method and where is the documentation?


You can use it this way

var myp = new MySqlParameterCollection();

myp.Add(new MySqlParameter(parameterName, dbType, size));

OR

MySqlParameter[] myArray = new MySqlParameter[] { new MySqlParameter(parameterName, dbType, size), new MySqlParameter(parameterName, dbType, size));

myp.AddRange(myArray);

Now you can attach it your Command object