// defining public int foo ( params Object[] vals ) { foreach( Object i in vals ) { ... } } // calling foo( 1, 4);