Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to pass array in my C# code

Status
Not open for further replies.

tshad

Programmer
Jul 15, 2004
386
US
I am getting an error:

Array creation must have array size or array initializer

for my method:

RunProcedure("sp_Accounts_GetAllRoles", new IDataParameter[], "Roles")

How would I call the IDataParameter (which is an array?

Thanks,

Tom
 
This was how the VB.Net code had it:

RunProcedure("sp_Accounts_GetAllRoles", New IDataParameter() {}, "Roles")

Thanks,

Tom
 
I found it.

It needed the {} just as the vb.net did and it needed "New" to be "new".

Thanks,

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top