Question:You need to return the contents of an isolated storage file as a string. The file is machine-scoped and is named Settings.dat. Which code segment should you use? 

A IsolatedStorageFile= isoFile;
isoFile = IsolatedStorageFile::GetMachineStoreForAssembly(); IsolatedStorageFileStream= isoStream; 
isoStream = gcnew IsolatedStorageFileStream(

"Settings.dat", FileMode::Open, isoFile);
String= result = (gcnew StreamReader(isoStream))->ReadToEnd(); 

B IsolatedStorageFileStream= isoStream;
isoStream = gcnew IsolatedStorageFileStream(
"Settings.dat", FileMode::Open);
String= result = isoStream->ToString(); 

C IsolatedStorageFile= isoFile;
isoFile = IsolatedStorageFile::GetMachineStoreForAssembly(); IsolatedStorageFileStream= isoStream; isoStream = gcnew IsolatedStorageFileStream(
"Settings.dat", FileMode::Open, isoFile);
String= result = isoStream->ToString(); 

D IsolatedStorageFileStream= isoStream;
isoStream = gcnew IsolatedStorageFileStream(
"Settings.dat", FileMode::Open);
String= result = (gcnew StreamReader(isoStream))->ReadToEnd(); 

+ Answer
+ Report
Total Preview: 1038

Copyright © 2024. Powered by Intellect Software Ltd