C#声明空字符串数组 [英] C# declare empty string array
本文介绍了C#声明空字符串数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要声明一个空字符串数组,我使用这个code
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.
怎么了?
感谢
推荐答案
试试这个
string[] arr = new string[] {};
这篇关于C#声明空字符串数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文