public string GetSections(string File)
{
byte[] temp = new byte[8000];
int s = GetPrivateProfileSectionNames(temp, 8000, File);
String result = Encoding.Default.GetString(temp);
String[] names = result.Split('\0');
result = "[";
foreach (String name in names)
{
if (name != String.Empty)
{
result = result + "\"" + name + "\",";
}
}
result = result.Remove(result.Length - 1, 1);
result = result + "]";
return result;
}