Check if DirectoryInfo.FullName is special folder
问题 My goal is to check, if DirectoryInfo.FullName is one of the special folders. Here is what I'm doing for this (Check directoryInfo.FullName to each special folder if they are equal): DirectoryInfo directoryInfo = new DirectoryInfo("Directory path"); if (directoryInfo.FullName == Environment.GetFolderPath(Environment.SpecialFolder.Windows) || directoryInfo.FullName == Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles ||) ... ... ) { // directoryInfo is the special folder } But