FileInfoExtensionsToShellObject Method
Converts the specified FileInfo to ShellObject.
Namespace: DevCase.ThirdParty.WindowsApiCodePack.Extensions.FileInfoExtensionsAssembly: DevCase.net48.ThirdParty.WindowsApiCodePack (in DevCase.net48.ThirdParty.WindowsApiCodePack.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static ShellObject ToShellObject(
this FileInfo sender
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function ToShellObject (
sender As FileInfo
) As ShellObject
Dim sender As FileInfo
Dim returnValue As ShellObject
returnValue = sender.ToShellObject()
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static ShellObject^ ToShellObject(
FileInfo^ sender
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member ToShellObject :
sender : FileInfo -> ShellObject
No code example is currently available or this language may not be supported.
- sender FileInfo
-
The source FileInfo.
ShellObject
The resulting
ShellObjectIn Visual Basic and C#, you can call this method as an instance method on any object of type
FileInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example to get the DisplayArtist property of MP3 audio files.
No code example is currently available or this language may not be supported.
For Each file As FileInfo In New DirectoryInfo("C:\Music\").GetFiles("*.mp3", SearchOption.TopDirectoryOnly)
Dim sFile As ShellObject = file.ToShellObject()
Dim propValue As String = sFile.Properties.System.Music.DisplayArtist.Value
Console.WriteLine(propValue)
Next
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.