//init the string array to empty
public string[] emptyStringArray(string[] strArr)
{
if (strArr != null)
{
for (int idx = 0; idx < strArr.Length; idx++)
{
strArr[idx] = String.Empty;
//strArr[idx] = "";
}
}
return strArr;
}
例 5.2. emptyStringArray 的使用范例
//5 bullet
//public string[] bulletArr; // total 5 (or more, but only record 5)
productInfo.bulletArr = new string[5];
crl.emptyStringArray(productInfo.bulletArr);