c# - The name 'Directory' does not exist in the current context -
i create music player, because i'm learning how write universal app. i'm trying load list of songs in folder when use getfiles, visual studio shows me error: "
the name 'directory' not exist in current context"
even though @ beginning of code have "using system.io". doing wrong?
using system; using system.collections.generic; using system.io; using system.linq; using system.runtime.interopservices.windowsruntime; using windows.foundation; using windows.foundation.collections; using windows.ui.xaml; using windows.ui.xaml.controls; using windows.ui.xaml.controls.primitives; using windows.ui.xaml.data; using windows.ui.xaml.input; using windows.ui.xaml.media; using windows.ui.xaml.navigation; namespace project_2 { public sealed partial class select : page { private void add_new_song(int song_number) {...} private string[] load_songs() { string[] paths = directory.getfiles(@"c:\"); } public select() {...} private void gridview_itemclick(object sender, itemclickeventargs e) {...} } }
directory
not part of store apps sdk, , if getfiles
not exist there no synchronous methods in sdk access disc resources.
you looking storeagefolder.getfilesasync or similar api...
Comments
Post a Comment