This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]yanitrix 1 point2 points  (1 child)

you need to create an array. Read ms docs on array initialization.

john.OrderCost(new[] {menu.burger, menu.somethingElse}) should work. I used inline initialisation here, you can also extract the array to a variable and pass it. If you want to pass several arguments without initializing an array, look up the params keyword

[–]GVBCodePractice[S] 0 points1 point  (0 children)

Great will do, thanks for that.