lim

lim

  • NA
  • 16
  • 0

How to return an array?

Jan 5 2006 3:16 AM
I have a method whereby I will read the ini parameter and store it in an array.
After that, I would like to return the array Para to the class. May I know how to do it?

My code is as below :

public static string [] ReadIni()

{

IniFile EPCini = new IniFile("C:\\EPC.ini");

String NoOfPara = EPCini.IniReadValue("BASIC", "NumOfPara");

int NumberOfPara = int.Parse(NoOfPara);

string [] Para = new string [NumberOfPara+1];

for (int i =1; i<=NumberOfPara; i++)

{

Para[i] = EPCini.IniReadValue("BASIC", "Para" + i);

return Para;

}

}


Answers (3)