3
에 허용되지작동 내가 오류가 IsolatedStorageFileStream
당신이CreateFile
메소드에 의해 반환되는 스트림을 닫지 않았다 때문이다
using (var myFileStore = IsolatedStorageFile.GetUserStoreForApplication())
{
myFileStore.CreateFile(DateTime.Now.Ticks + ".txt");
}
using (var myFileStore = IsolatedStorageFile.GetUserStoreForApplication())
{
temp = myFileStore.GetFileNames();
for (int k = 0; k < temp.Length; k++)
{
IsolatedStorageFileStream file1 = myFileStore.OpenFile(temp[k], FileMode.Open, FileAccess.Read);
dataSource.Add(new SampleData() { Name = temp[k], Size = Convert.ToString(Math.Round(Convert.ToDouble(file1.Length)/1024/1024, 1) + " MB") });
}
}