+ 1

I don't know what is wrong here

I was practicing queues in c# but got stuck in the queue it up code coach. It kept showing the error: "Cannot convert method group 'ToArray' to non-delegate type 'int[]'. Did you intend to invoke the method?" This is the code https://code.sololearn.com/c2g8Cw0Nv9Re/?ref=app https://code.sololearn.com/c2g8Cw0Nv9Re/?ref=app

17th Jul 2022, 1:53 PM
Shivansh Mourya
Shivansh Mourya - avatar
2 Answers
+ 3
You are missing parentheses on the method call ToArray. q.ToArray()
17th Jul 2022, 2:00 PM
Brian
Brian - avatar
+ 2
... Thanks
17th Jul 2022, 2:02 PM
Shivansh Mourya
Shivansh Mourya - avatar