Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Array Creation Must Have Array Size Or Array Initializer in C# [closed]

Tags:

arrays

c#

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.

like image 599
Bills The God Of Destruction Avatar asked Sep 03 '25 15:09

Bills The God Of Destruction


1 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! ^^

like image 141
Gabriel Stancu Avatar answered Sep 05 '25 05:09

Gabriel Stancu