In response to the original query this is how I add a parameter:-

cmd.parameters.add(new sqlparamater("@someid", sqldbtype.int)).value = someint

This makes the code nice and short, allows me to define the type and specify the value all in one line and I only need another line if I need to specify direction, which is rarely.