2
var myDevices= await Windows.Devices.
Enumeration.DeviceInformation.
FindAllAsync(Windows.Devices.Enumeration.DeviceClass.PortableStorageDevice);
foreach(var x in myDevices)
{
string s = string.Format("Kind:{0} Name:{1} Id:{2})",
x.Kind.tostring(), x.Name, x.Id);
listbox1.items.add(s);
}
이것은 내 예제 코드입니다. myDevices 객체 항목의 드라이브에 액세스 할 수있는 속성을 검색 할 수 있습니까? (D : \ 또는 E : \ etc와 같은 것). 심지어 나는 어쩌면 그것은 당신의 경우에 여전히 적용,UWP 범용 응용 프로그램에서 드라이브 문자 사용
@VMAtm 당신이 [RemovableDevices]의 하위 폴더의 경로 속성을 사용하여 같은 드라이브 이름을 얻을 수있는 지적 (https : //로 docs.microsoft.com/en-us/uwp/api/windows.storage.knownfolders#Windows_Storage_KnownFolders_RemovableDevices). –