I just saw this code
if ((fsi.Attributes & FileAttributes.Directory) == FileAttributes.Directory)
{
//...
}
It seems a little weird. A different way of testing?? I’d expect easily expect something like
if ((FirstName=="Richard") & (LastName == "DeFortune" )
{
//...
}
With the & in the middle of both tests
Thanks
If you look at closely FileAttribute is Enum with Attribute Mark as Flag.
you will get more info at here : http://dotnetstep.blogspot.com/2009/01/flags-attribute-for-enum.html
Now single ‘&’ is bitwise operator.
Example
Hope this help you.