aquanat aquanat - 2 months ago 46
C# Question

C# declare empty string array

I need to declare an empty string array and i'm using this code

string[] arr = new String[0]();


but i get "method name expected" error.

What's wrong?

Thanks

Answer

Try this

string[] arr = new string[] {};