L
lucius
I am building a generic SqlCommand builder and want to use 2.0
Generics.
I want to create a Generic list of SqlCommands, and put new
SqlCommands
in the list, populate the commands, and then run them. New SqlCommands
should go into the list if a command does not already have the same
CommandText (which maps to a SQL Server stored procedure name).
I'm having a problem with the syntax to make this happen,
here is what I have so far:
List<SqlCommand> sqlCommands = new List<SqlCommand>();
if ( sqlCommands.FindAll( //what to put here... ) == false )
{
// add the new command
}
What is the right way to do this?
Thanks.
Generics.
I want to create a Generic list of SqlCommands, and put new
SqlCommands
in the list, populate the commands, and then run them. New SqlCommands
should go into the list if a command does not already have the same
CommandText (which maps to a SQL Server stored procedure name).
I'm having a problem with the syntax to make this happen,
here is what I have so far:
List<SqlCommand> sqlCommands = new List<SqlCommand>();
if ( sqlCommands.FindAll( //what to put here... ) == false )
{
// add the new command
}
What is the right way to do this?
Thanks.