Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I use SetAttr to set a file attribute in VB.NET 2005:

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.

  • Leaders
Posted
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.
[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...