FileSystemInfoExtensionsToShellObject Method
Converts the specified FileSystemInfo to ShellObject.
Namespace: DevCase.ThirdParty.WindowsApiCodePack.Extensions.FileSystemInfoExtensionsAssembly: 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 FileSystemInfo sender
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function ToShellObject (
sender As FileSystemInfo
) As ShellObject
Dim sender As FileSystemInfo
Dim returnValue As ShellObject
returnValue = sender.ToShellObject()
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static ShellObject^ ToShellObject(
FileSystemInfo^ sender
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member ToShellObject :
sender : FileSystemInfo -> ShellObject
No code example is currently available or this language may not be supported.
- sender FileSystemInfo
-
The source FileSystemInfo.
ShellObject
The resulting
ShellObjectIn Visual Basic and C#, you can call this method as an instance method on any object of type
FileSystemInfo. 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.
No code example is currently available or this language may not be supported.
Dim file As New FileInfo("C:\Movie.mkv")
Using shObj As ShellObject = file.ToShellObject()
Dim prop As ShellProperty(Of ULong?) = shObj.Properties.System.Media.Duration
Dim rawDuration As ULong? = prop.Value
Dim duration As TimeSpan = TimeSpan.FromTicks(rawDuration.GetValueOrDefault(0UL))
Console.WriteLine($"File name: {mediaFile.Name}; Duration: {duration:hh\:mm\:ss}")
End Using
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.