GetStore Method

IsolatedStorageFile.GetStore Method

Obtains isolated storage corresponding to the given application domain and assembly evidence objects and isolated storage scope.

Overload List

Obtains the isolated storage corresponding to the given application domain and assembly evidence objects.

[Visual Basic] Overloads Public Shared Function GetStore(IsolatedStorageScope, Object, Object) As IsolatedStorageFile
[C#] public static IsolatedStorageFile GetStore(IsolatedStorageScope, object, object);
[C++] public: static IsolatedStorageFile* GetStore(IsolatedStorageScope, Object*, Object*);
[JScript] public static function GetStore(IsolatedStorageScope, Object, Object) : IsolatedStorageFile;

Obtains isolated storage corresponding to the isolated storage scope given the application domain and assembly evidence types.

[Visual Basic] Overloads Public Shared Function GetStore(IsolatedStorageScope, Type, Type) As IsolatedStorageFile
[C#] public static IsolatedStorageFile GetStore(IsolatedStorageScope, Type, Type);
[C++] public: static IsolatedStorageFile* GetStore(IsolatedStorageScope, Type*, Type*);
[JScript] public static function GetStore(IsolatedStorageScope, Type, Type) : IsolatedStorageFile;

Obtains isolated storage corresponding to the given application domain and the assembly evidence objects and types.

[Visual Basic] Overloads Public Shared Function GetStore(IsolatedStorageScope, Evidence, Type, Evidence, Type) As IsolatedStorageFile
[C#] public static IsolatedStorageFile GetStore(IsolatedStorageScope, Evidence, Type, Evidence, Type);
[C++] public: static IsolatedStorageFile* GetStore(IsolatedStorageScope, Evidence*, Type*, Evidence*, Type*);
[JScript] public static function GetStore(IsolatedStorageScope, Evidence, Type, Evidence, Type) : IsolatedStorageFile;

Example

[Visual Basic, C#, C++] The following code example demonstrates the GetStore method. For the complete context of this example, see the IsolatedStorageFile overview.

[Visual Basic, C#, C++] Note   This example shows how to use one of the overloaded versions of GetStore. For other examples that might be available, see the individual overload topics.
[Visual Basic] 
' Retrieve an IsolatedStorageFile for the current Domain and Assembly.
Dim isoFile As IsolatedStorageFile = _
    IsolatedStorageFile.GetStore(IsolatedStorageScope.User _
    Or IsolatedStorageScope.Assembly _
    Or IsolatedStorageScope.Domain, Nothing, Nothing)

Dim isoStream As New IsolatedStorageFileStream(Me.userName, FileMode.Open, _
    FileAccess.Read, FileShare.Read)

[C#] 

                // Retrieve an IsolatedStorageFile for the current Domain and Assembly.
                IsolatedStorageFile isoFile =
                    IsolatedStorageFile.GetStore(IsolatedStorageScope.User |
                    IsolatedStorageScope.Assembly |
                    IsolatedStorageScope.Domain ,
                    null,
                    null);

                IsolatedStorageFileStream isoStream =
                    new IsolatedStorageFileStream( this.userName,
                    FileMode.Open,
                    FileAccess.Read,
                    FileShare.Read);  

[C++] 
// Retrieve an IsolatedStorageFile for the current Domain and Assembly.
IsolatedStorageFile* isoFile =
   IsolatedStorageFile::GetStore(
   static_cast<IsolatedStorageScope>(IsolatedStorageScope::User | 
   IsolatedStorageScope::Assembly |
   IsolatedStorageScope::Domain),
   (Type*)0, 0);
IsolatedStorageFileStream* isoStream = new IsolatedStorageFileStream(this->userName,
   FileMode::Open,  
   FileAccess::ReadWrite,
   isoFile);

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

IsolatedStorageFile Class | IsolatedStorageFile Members | System.IO.IsolatedStorage Namespace

Show:
© 2016 Microsoft