set attr

ADO DOT NET

Centurion
Joined
Dec 20, 2006
Messages
160
I use SetAttr to set a file attribute in VB.NET 2005:
Visual Basic:
FileSystem.SetAttr(FilePath, FileAttribute.Normal)
But in MSDN I red that:
The My feature gives you greater productivity and performance in file I/O operations than SetAttr. For more information, see My.Computer.FileSystem Object.
However I was unable to find the "My" version of this command, what should I use?
Thanks.
 
Being a C# programmer, I naturally discourage the use of the "My" feature (it is not supported in other languages and is, really, superfluous) but everyone has their own opinion. I'm actually not familiar with the FileSystem class. Is it from VB6? Why not use System.IO.File.GetAttributes and System.IO.File.SetAttributes? These, as far as I know, are the de-facto DotNet standard.
 
Back
Top