IsNotHidden

public static class DirectoryInfoExtensions
    {
        public static bool IsNotHidden(this DirectoryInfo directoryInfo)
        {
            return (directoryInfo.Attributes & FileAttributes.Hidden) == 0;
        }
    }
Example:
var files = new DirectoryInfo(@"\\myserver\C$").GetDirectories().Where(x => x.IsNotHidden()).Select(x => x.Name).ToArray();

Description

Filters out directories that are hidden

Details

Double click on the code to select all.

 

;