| Visual Basic (Declaration) | |
|---|---|
Public Property Attributes As FileAttributes | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As FileSystemItem Dim value As FileAttributes instance.Attributes = value value = instance.Attributes | |
| C# | |
|---|---|
public FileAttributes Attributes {get; set;} | |
Property Value
A combination of System.IO.FileAttributes values that represents the attributes of the item.When changing the item's attributes through this property, the physical item is immediately modified if it exists. If it does not exist, the attributes are cached and will be applied whenever this item is created.
If HasAttributes returns false, the getter returns System.IO.FileAttributes.Normal and System.IO.FileAttributes.Directory while the setter throws a FileSystemNotSupportedException.
Keep in mind that even if HasAttributes returns true, it is not guaranteed that all the attributes are supported. The non-supported attributes will simply be ignored.
Target Platforms: Windows 2000, Windows XP SP3 Family, Windows Server 2003-2008 Family, Windows Vista, Windows 7
Copy Code