次の方法で共有


IsolatedStorageFile.GetUserStoreForAssembly メソッド

呼び出し元のコードのアセンブリ ID に対応する分離ストレージを取得します。

Public Shared Function GetUserStoreForAssembly() As _
   IsolatedStorageFile
[C#]
public static IsolatedStorageFile GetUserStoreForAssembly();
[C++]
public: static IsolatedStorageFile* GetUserStoreForAssembly();
[JScript]
public static function GetUserStoreForAssembly() :
   IsolatedStorageFile;

戻り値

呼び出し元のコードのアセンブリ ID に基づく分離ストレージ スコープに対応する IsolatedStorageFile

例外

例外の種類 条件
SecurityException 分離ストレージに対して必要なアクセス許可が与えられていません。

解説

異なるアプリケーション内でも、同じアセンブリの場合は、このメソッドを使用するときに、同じ分離ストアを必ず使用します。

GetUserStoreForAssembly は、機能的には次のコードと同じです。

 
GetStore(IsolatedStorageScope.Assembly Or IsolatedStorageScope.User, Nothing, Nothing)
[C#] 
GetStore(IsolatedStorageScope.Assembly | IsolatedStorageScope.User, null, null);

メモ   同じアプリケーション ドメイン内で実行されている異なるアセンブリは、必ず個別の分離ストアを保有します。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

.NET Framework セキュリティ:

参照

IsolatedStorageFile クラス | IsolatedStorageFile メンバ | System.IO.IsolatedStorage 名前空間