Array Creation Must Have Array Size Or Array Initializer in C#

Viewed 11248

I got this error with a .dll and I'm trying to fix it:

https://pastebin.com/raw/tDDbb93n

The error is on the following line:

Logger.n("Saving {0}", new object[]);

Thanks.

2 Answers

Hello and Welcome to Stack Overflow! It is quite simple actually: all you have to do is to declare the size of your array on the line you create and use it. Instead of new object[] you could try new object[32]. (or any size that helps you)

Hope this helps! ^^

You need to specify the size of the object array.

Try this: Logger.n("Saving {0}", new object[10]);

Related