aquanat aquanat - 1 year ago 198
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?


Answer Source

Try this

string[] arr = new string[] {};
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download