jjzjj

IsolatedStorageFileStream

全部标签

c# - 如何知道WINDOWS操作系统为独立存储提供的存储空间?

如何知道Windows操作系统为隔离存储提供的存储空间?我可以通过任何方法知道吗|属性(property)|C#中的类? 最佳答案 您可以像这样确定隔离存储的可用空间:usingSystem;usingSystem.IO;usingSystem.IO.IsolatedStorage;publicclassCheckingSpace{publicstaticvoidMain(){//Getanisolatedstoreforthisassemblyandputitintoan//IsolatedStoreFileobject.Isol

c# - Windows Phone 将数据保存到文件

我尝试将数据保存到文件,但收到以下错误OperationnotpermittedonIsolatedStorageFileStream行IsolatedStorageFileStreamfileStream=newIsolatedStorageFileStream(path,FileMode.OpenOrCreate,storage);publicSaveFile(stringpath,stringdata){varstorage=IsolatedStorageFile.GetUserStoreForApplication();IsolatedStorageFileStreamfile

c# - ClickOnce 和 IsolatedStorage

Winform应用程序在我们的Intranet中与ClickOnce一起发布。我们将个人对GUI的偏好存储在隔离存储中。一切正常:)问题是当我们有一个新版本的应用程序时,我们发布...所有首选项都丢失了!用户需要在每个版本上设置他们的偏好。有没有办法卡住整个应用程序而不是版本的隔离? 最佳答案 您需要使用应用程序作用域,而不是域作用域的独立存储。这可以通过使用IsolatedStorageFileStream的重载构造函数之一来完成。例子:usingSystem.IO;usingSystem.IO.IsolatedStorage;.

c# - 检查流是否为空

我正在尝试反序列化一个XML文件。在绑定(bind)反序列化之前,我需要检查XML文件流是否为空。IsolatedStorageFileStreamisfs1=newIsolatedStorageFileStream("test.xml",FileMode.Open,FileAccess.Read,isf);//DeserializetheXMLtoanobjectSettingss=newSettings();SoapFormatterSF=newSoapFormatter();s=(Settings)SF.Deserialize(isfs1);如何检查isfs1是否为空?

c# - 检查流是否为空

我正在尝试反序列化一个XML文件。在绑定(bind)反序列化之前,我需要检查XML文件流是否为空。IsolatedStorageFileStreamisfs1=newIsolatedStorageFileStream("test.xml",FileMode.Open,FileAccess.Read,isf);//DeserializetheXMLtoanobjectSettingss=newSettings();SoapFormatterSF=newSoapFormatter();s=(Settings)SF.Deserialize(isfs1);如何检查isfs1是否为空?