 <p><code>m.Attributes</code> can consist of a combination of some flag values, and <code>FileAttributes.Hidden</code> is one of them.(The complete list can be seen in <a href="https://msdn.microsoft.com/en-US/library/system.io.fileattributes.aspx" rel="nofollow">MSDN</a>)</p> <p>So, the predicate of the first statement: </p> <pre><code> m.Attributes &lt;&gt; FileAttributes.Hidden </code></pre> <p>tests "not (<code>m.Attributes</code> consists of only one flag <code>Hidden</code>)", that is even true for the value of the combinations of <code>Hidden</code> and <code>ReadOnly</code>, or <code>Hidden</code> and <code>System</code>, etc.</p> <p>The second statement:</p> <pre><code>(m.Attributes And FileAttributes.Hidden) = 0 </code></pre> <p>tests "pick up the partial value of <code>Hidden</code> from <code>m.Attribute</code>, and see if not set", that is true at least if the value doesn't have <code>Hidden</code> set, and the other flags are ignored. Hence that is false for the combinations of <code>Hidden</code> and <code>ReadOnly</code>, or <code>Hidden</code> and <code>System</code>, etc.</p> <hr> <p>As a side note, <code>.Select(Function(k) k)</code> does nothing and can be omitted. </p> <pre><code>subFolder.GetFiles().Where(Function(m) (m.Attributes And FileAttributes.Hidden) = 0).Count </code></pre>