private static string[] GetConfigSearchPaths()
{
ArrayList pathList = new ArrayList();
// Check the current folder first.
pathList.Add("");
#if !NETCF
AppDomain currentDomain = AppDomain.CurrentDomain;
// Check the folder the assembly is located in.
pathList.Add(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
if(null != currentDomain.BaseDirectory)
{
pathList.Add(currentDomain.BaseDirectory);
}
if(null != currentDomain.RelativeSearchPath)
{
pathList.Add(currentDomain.RelativeSearchPath);
}
#endif
return (string[]) pathList.ToArray(typeof(string));
}