hi there:
I have a class inplement IDataParameterCollection.looks like buttom code,I have a override method named this.
public class DBParameters : ArrayList, IDataParameterCollection
{
public object this[string parameterName]
{
get
{
return this.IndexOf(parameterName);
}
set
{
// TODO: Add DBParameters.this setter implementation
}
}
}
I have another method in another class like buttom.
public void GetCommand(IDbCommand cmd, string strCmdText, CommandType cmdType, DBParameters parameterCollection)
{
DBParameter objDbParameter;
for (int i = 0; i < parameterCollection.Count - 1; i++)
{
objDbParameter = parameterCollection[i];
cmd.Parameters.Add
(new SqlParameter(
objDbParameter.ParameterName,
objDbParameter.DbType,
objDbParameter.Size,
objDbParameter.SourceColumn));
}
}
I want (this) method return a DBParameter type object ,how can i achieve this .
thanks a lot
jiangyh