Я сохранил текстовый файл в изолированном хранилище, мой файл сохраняется в виде «asdasdasd, asdasdasd», как я могу использовать разделители, чтобы пролить их, а не извлекать целую строку следующим образом:извлекать значения разделителями
//Get the Store we created earlier
IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication();
//use a StreamReader to open and read the file
StreamReader readFile = null;
try
{
readFile = new StreamReader(new IsolatedStorageFileStream("SaveFolder\\SavedFile.txt", FileMode.Open, store));
string fileText = readFile.ReadToEnd();
//The control txtRead will display the text entered in the file
textBlock2.Text = fileText;
readFile.Close();
}
catch
{
//For now, a simple catch to make sure they created it first
//we will modify this later
textBlock2.Text = "Need to create directory and the file first.";
}
Как я могу использовать массив strs? – NoobieNeedHelp
@NoobieNeedHelp, это зависит от того, что вы хотите с ним сделать. –
пример ввода в текстовое поле textBlock2.Text = fileText; readFile.Close(); – NoobieNeedHelp