Hey, I got it working, was very close to your example:

ArrayList nets = new ArrayList();

DirectoryEntry entryPC;
entryPC = new DirectoryEntry();
entryPC.Path = "WinNT://domainName";

foreach (DirectoryEntry child in entryPC.Children)
{
   if (child.Name != "Schema")
   nets.Add(child.Name);
  }

return nets;

 

(obviously using System.DirectoryServices)

Thanks!