IsolatedStorageFileStream コンストラクタとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > IsolatedStorageFileStream コンストラクタの意味・解説 

IsolatedStorageFileStream コンストラクタ (String, FileMode)

指定した mode で、path によって指定されファイルへのアクセス与える IsolatedStorageFileStream オブジェクト新しインスタンス初期化します。

名前空間: System.IO.IsolatedStorage
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    path As String, _
    mode As FileMode _
)
Dim path As String
Dim mode As FileMode

Dim instance As New IsolatedStorageFileStream(path,
 mode)
public IsolatedStorageFileStream (
    string path,
    FileMode mode
)
public:
IsolatedStorageFileStream (
    String^ path, 
    FileMode mode
)
public IsolatedStorageFileStream (
    String path, 
    FileMode mode
)
public function IsolatedStorageFileStream (
    path : String, 
    mode : FileMode
)

パラメータ

path

分離ストレージ内でのファイル相対パス

mode

FileMode 値の 1 つ

例外例外
例外種類条件

ArgumentException

path形式正しくありません。

ArgumentNullException

pathnull 参照 (Visual Basic では Nothing) です。

DirectoryNotFoundException

path 内にディレクトリ存在しません。

FileNotFoundException

modeOpen設定されていますが、ファイルが見つかりません。

解説解説

使用する分離ストアスコープは、現在実行されているアセンブリID と、このアセンブリ実行しているアプリケーション ドメインID によって指定されます。このストアは、IsolatedStorageFileStream オブジェクト有効期間の間だけ開かれたままになります別の分離ストレージ スコープ指定するか、ストア開いたままにすることで、複数IsolatedStorageFileStream オブジェクトを開くことができるようにする場合は、IsolatedStorageFile オブジェクト扱える形式コンストラクタ使用します

mode パラメータは、新しファイル作成するか、既存ファイル使用するかなどを示します

注意に関するメモ注意

特定のカルチャ設定文字セットコンパイルし、同じ文字異なるカルチャ設定取得すると、文字解釈されないことがあります。さらに、例外スローされることもあります

.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IsolatedStorageFileStream クラス
IsolatedStorageFileStream メンバ
System.IO.IsolatedStorage 名前空間

IsolatedStorageFileStream コンストラクタ (String, FileMode, IsolatedStorageFile)

mode指定したモードisf指定した IsolatedStorageFileコンテキスト使用してpath指定したファイルへのアクセス提供する IsolatedStorageFileStream クラス新しインスタンス初期化します。

名前空間: System.IO.IsolatedStorage
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    path As String, _
    mode As FileMode, _
    isf As IsolatedStorageFile _
)
Dim path As String
Dim mode As FileMode
Dim isf As IsolatedStorageFile

Dim instance As New IsolatedStorageFileStream(path,
 mode, isf)
public IsolatedStorageFileStream (
    string path,
    FileMode mode,
    IsolatedStorageFile isf
)
public:
IsolatedStorageFileStream (
    String^ path, 
    FileMode mode, 
    IsolatedStorageFile^ isf
)
public IsolatedStorageFileStream (
    String path, 
    FileMode mode, 
    IsolatedStorageFile isf
)
public function IsolatedStorageFileStream (
    path : String, 
    mode : FileMode, 
    isf : IsolatedStorageFile
)

パラメータ

path

分離ストレージ内でのファイル相対パス

mode

FileMode 値の 1 つ

isf

IsolatedStorageFileStream を開くために使用する IsolatedStorageFile。

例外例外
例外種類条件

ArgumentException

path形式正しくありません。

ArgumentNullException

pathnull 参照 (Visual Basic では Nothing) です。

FileNotFoundException

modeOpen設定されていますが、ファイルが見つかりません。

IsolatedStorageException

isfクォータ持っていません。

解説解説
使用例使用例

このコンストラクタ使用方法については、次のコード例参照してください。この例のコンテキスト全体については、IsolatedStorageFileStream概要参照してください

' Open or create a writable file.
Dim target As New IsolatedStorageFileStream("Archive\
 " & Me.userName, _
     FileMode.OpenOrCreate, FileAccess.Write, FileShare.Write, isoFile)
IsolatedStorageFileStream source =
    new IsolatedStorageFileStream(this.userName,
 FileMode.OpenOrCreate,
    isoFile);
// This is the stream from which data will be read.
Console.WriteLine("Is the source file readable? " + (source.CanRead ? "true"
 : "false"));
Console.WriteLine("Creating new IsolatedStorageFileStream
 for Archive.");

// Open or create a writable file.
IsolatedStorageFileStream target =
    new IsolatedStorageFileStream("Archive\\ " + this.userName
,
    FileMode.OpenOrCreate,
    FileAccess.Write,
    FileShare.Write,
    isoFile);
// This is the stream to which data will be written.
IsolatedStorageFileStream^ source = gcnew IsolatedStorageFileStream( this->userName,FileMode::OpenOrCreate,isoFile
 );

// This is the stream from which data will be read.
Console::WriteLine( "Is the source file readable?  {0}", (source->CanRead
 ? (String^)"true" : "false")
 );
Console::WriteLine( "Creating new IsolatedStorageFileStream
 for Archive." );

// Open or create a writable file.
IsolatedStorageFileStream^ target = gcnew IsolatedStorageFileStream( String::Concat("Archive\\",this->userName),FileMode::OpenOrCreate,FileAccess::Write,FileShare::Write,isoFile
 );

.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IsolatedStorageFileStream クラス
IsolatedStorageFileStream メンバ
System.IO.IsolatedStorage 名前空間

IsolatedStorageFileStream コンストラクタ (String, FileMode, FileAccess, FileShare, IsolatedStorageFile)

mode指定したモードshare指定したファイル共有モードisf指定した IsolatedStorageFileコンテキスト使用してpath指定したファイルへの、access指定した種類アクセス提供する IsolatedStorageFileStream クラス新しインスタンス初期化します。

名前空間: System.IO.IsolatedStorage
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    path As String, _
    mode As FileMode, _
    access As FileAccess, _
    share As FileShare, _
    isf As IsolatedStorageFile _
)
Dim path As String
Dim mode As FileMode
Dim access As FileAccess
Dim share As FileShare
Dim isf As IsolatedStorageFile

Dim instance As New IsolatedStorageFileStream(path,
 mode, access, share, isf)
public IsolatedStorageFileStream (
    string path,
    FileMode mode,
    FileAccess access,
    FileShare share,
    IsolatedStorageFile isf
)
public:
IsolatedStorageFileStream (
    String^ path, 
    FileMode mode, 
    FileAccess access, 
    FileShare share, 
    IsolatedStorageFile^ isf
)
public IsolatedStorageFileStream (
    String path, 
    FileMode mode, 
    FileAccess access, 
    FileShare share, 
    IsolatedStorageFile isf
)
public function IsolatedStorageFileStream (
    path : String, 
    mode : FileMode, 
    access : FileAccess, 
    share : FileShare, 
    isf : IsolatedStorageFile
)

パラメータ

path

分離ストレージ内でのファイル相対パス

mode

FileMode 値の 1 つ

access

FileAccess 値のビットごとの組み合わせ

share

FileShare 値のビットごとの組み合わせ

isf

IsolatedStorageFileStream を開くために使用する IsolatedStorageFile。

例外例外
例外種類条件

ArgumentException

path形式正しくありません。

ArgumentNullException

pathnull 参照 (Visual Basic では Nothing) です。

FileNotFoundException

modeOpen設定されていますが、ファイルが見つかりません。

IsolatedStorageException

isfクォータ持っていません。

解説解説
使用例使用例

このコンストラクタ使用方法については、次のコード例参照してください。この例のコンテキスト全体については、IsolatedStorageFileStream概要参照してください

' Open or create a writable file.
Dim target As New IsolatedStorageFileStream("Archive\
 " & Me.userName, _
     FileMode.OpenOrCreate, FileAccess.Write, FileShare.Write, isoFile)
IsolatedStorageFileStream source =
    new IsolatedStorageFileStream(this.userName,
 FileMode.OpenOrCreate,
    isoFile);
// This is the stream from which data will be read.
Console.WriteLine("Is the source file readable? " + (source.CanRead ? "true"
 : "false"));
Console.WriteLine("Creating new IsolatedStorageFileStream
 for Archive.");

// Open or create a writable file.
IsolatedStorageFileStream target =
    new IsolatedStorageFileStream("Archive\\ " + this.userName
,
    FileMode.OpenOrCreate,
    FileAccess.Write,
    FileShare.Write,
    isoFile);
// This is the stream to which data will be written.
IsolatedStorageFileStream^ source = gcnew IsolatedStorageFileStream( this->userName,FileMode::OpenOrCreate,isoFile
 );

// This is the stream from which data will be read.
Console::WriteLine( "Is the source file readable?  {0}", (source->CanRead
 ? (String^)"true" : "false")
 );
Console::WriteLine( "Creating new IsolatedStorageFileStream
 for Archive." );

// Open or create a writable file.
IsolatedStorageFileStream^ target = gcnew IsolatedStorageFileStream( String::Concat("Archive\\",this->userName),FileMode::OpenOrCreate,FileAccess::Write,FileShare::Write,isoFile
 );

.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IsolatedStorageFileStream クラス
IsolatedStorageFileStream メンバ
System.IO.IsolatedStorage 名前空間

IsolatedStorageFileStream コンストラクタ (String, FileMode, FileAccess, FileShare)

mode指定したモードshare指定した共有モード使用してpath指定したファイルへの、access指定した種類アクセス提供する IsolatedStorageFileStream クラス新しインスタンス初期化します。

名前空間: System.IO.IsolatedStorage
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    path As String, _
    mode As FileMode, _
    access As FileAccess, _
    share As FileShare _
)
Dim path As String
Dim mode As FileMode
Dim access As FileAccess
Dim share As FileShare

Dim instance As New IsolatedStorageFileStream(path,
 mode, access, share)
public IsolatedStorageFileStream (
    string path,
    FileMode mode,
    FileAccess access,
    FileShare share
)
public:
IsolatedStorageFileStream (
    String^ path, 
    FileMode mode, 
    FileAccess access, 
    FileShare share
)
public IsolatedStorageFileStream (
    String path, 
    FileMode mode, 
    FileAccess access, 
    FileShare share
)
public function IsolatedStorageFileStream (
    path : String, 
    mode : FileMode, 
    access : FileAccess, 
    share : FileShare
)

パラメータ

path

分離ストレージ内でのファイル相対パス

mode

FileMode 値の 1 つ

access

FileAccess 値のビットごとの組み合わせ

share

FileShare 値のビットごとの組み合わせ

例外例外
例外種類条件

ArgumentException

path形式正しくありません。

ArgumentNullException

pathnull 参照 (Visual Basic では Nothing) です。

FileNotFoundException

modeOpen設定されていますが、ファイルが見つかりません。

解説解説

使用する分離ストアスコープは、現在実行されているアセンブリID と、このアセンブリ実行しているアプリケーション ドメインID によって指定されます。このストアは、IsolatedStorageFileStream オブジェクト有効期間の間だけ開かれたままになります別の分離ストレージ スコープ指定するか、ストア開いたままにすることで、複数IsolatedStorageFileStream オブジェクトを開くことができるようにする場合は、IsolatedStorageFile オブジェクト扱える形式コンストラクタ使用します

注意に関するメモ注意

特定のカルチャ設定文字セットコンパイルし、同じ文字異なるカルチャ設定取得すると、文字解釈されないことがあります。さらに、例外スローされることもあります

使用例使用例

このコンストラクタ使用方法については、次のコード例参照してください。この例のコンテキスト全体については、IsolatedStorageFileStream概要参照してください

' 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)
// 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);
// Retrieve an IsolatedStorageFile for the current Domain and Assembly.
IsolatedStorageFile^ isoFile = IsolatedStorageFile::GetStore( static_cast<IsolatedStorageScope>(IsolatedStorageScope::User
 | IsolatedStorageScope::Assembly | IsolatedStorageScope::Domain), (Type^)nullptr,
 nullptr );
IsolatedStorageFileStream^ isoStream = gcnew IsolatedStorageFileStream( this->userName,FileMode::Open,FileAccess::ReadWrite,isoFile
 );

.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IsolatedStorageFileStream クラス
IsolatedStorageFileStream メンバ
System.IO.IsolatedStorage 名前空間

IsolatedStorageFileStream コンストラクタ (String, FileMode, FileAccess, FileShare, Int32, IsolatedStorageFile)

mode指定したモードshare指定したファイル共有モードbuffersize指定したバッファ サイズisf指定した IsolatedStorageFileコンテキスト使用してpath指定したファイルへの、access指定した種類アクセス提供する IsolatedStorageFileStream クラス新しインスタンス初期化します。

名前空間: System.IO.IsolatedStorage
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    path As String, _
    mode As FileMode, _
    access As FileAccess, _
    share As FileShare, _
    bufferSize As Integer, _
    isf As IsolatedStorageFile _
)
Dim path As String
Dim mode As FileMode
Dim access As FileAccess
Dim share As FileShare
Dim bufferSize As Integer
Dim isf As IsolatedStorageFile

Dim instance As New IsolatedStorageFileStream(path,
 mode, access, share, bufferSize, isf)
public IsolatedStorageFileStream (
    string path,
    FileMode mode,
    FileAccess access,
    FileShare share,
    int bufferSize,
    IsolatedStorageFile isf
)
public:
IsolatedStorageFileStream (
    String^ path, 
    FileMode mode, 
    FileAccess access, 
    FileShare share, 
    int bufferSize, 
    IsolatedStorageFile^ isf
)
public IsolatedStorageFileStream (
    String path, 
    FileMode mode, 
    FileAccess access, 
    FileShare share, 
    int bufferSize, 
    IsolatedStorageFile isf
)
public function IsolatedStorageFileStream (
    path : String, 
    mode : FileMode, 
    access : FileAccess, 
    share : FileShare, 
    bufferSize : int, 
    isf : IsolatedStorageFile
)

パラメータ

path

分離ストレージ内でのファイル相対パス

mode

FileMode 値の 1 つ

access

FileAccess 値のビットごとの組み合わせ

share

FileShare 値のビットごとの組み合わせ

bufferSize

FileStream のバッファ サイズ

isf

IsolatedStorageFileStream を開くために使用する IsolatedStorageFile。

例外例外
例外種類条件

ArgumentException

path形式正しくありません。

ArgumentNullException

pathnull 参照 (Visual Basic では Nothing) です。

FileNotFoundException

modeOpen設定されていますが、ファイルが見つかりません。

IsolatedStorageException

isfクォータ持っていません。

解説解説
使用例使用例

このコンストラクタ使用方法については、次のコード例参照してください。この例のコンテキスト全体については、IsolatedStorageFileStream概要参照してください

' Open or create a writable file with a maximum size of 10K.
Dim isoStream As New IsolatedStorageFileStream(Me.userName,
 FileMode.OpenOrCreate, _
    FileAccess.Write, FileShare.Write, 10240, isoFile)
// Open or create a writable file with a maximum size of 10K.
IsolatedStorageFileStream isoStream =
    new IsolatedStorageFileStream(this.userName
,
    FileMode.OpenOrCreate,
    FileAccess.Write,
    FileShare.Write,
    10240,
    isoFile);
// Open or create a writable file, no larger than 10k
IsolatedStorageFileStream^ isoStream = gcnew IsolatedStorageFileStream( this->userName,FileMode::OpenOrCreate,FileAccess::Write,FileShare::Write,10240,isoFile
 );

.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IsolatedStorageFileStream クラス
IsolatedStorageFileStream メンバ
System.IO.IsolatedStorage 名前空間

IsolatedStorageFileStream コンストラクタ (String, FileMode, FileAccess, FileShare, Int32)

mode指定したモードshare指定したファイル共有モードbuffersize指定したバッファ サイズ使用してpath指定したファイルへの、access指定した種類アクセス提供する IsolatedStorageFileStream クラス新しインスタンス初期化します。

名前空間: System.IO.IsolatedStorage
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    path As String, _
    mode As FileMode, _
    access As FileAccess, _
    share As FileShare, _
    bufferSize As Integer _
)
Dim path As String
Dim mode As FileMode
Dim access As FileAccess
Dim share As FileShare
Dim bufferSize As Integer

Dim instance As New IsolatedStorageFileStream(path,
 mode, access, share, bufferSize)
public IsolatedStorageFileStream (
    string path,
    FileMode mode,
    FileAccess access,
    FileShare share,
    int bufferSize
)
public:
IsolatedStorageFileStream (
    String^ path, 
    FileMode mode, 
    FileAccess access, 
    FileShare share, 
    int bufferSize
)
public IsolatedStorageFileStream (
    String path, 
    FileMode mode, 
    FileAccess access, 
    FileShare share, 
    int bufferSize
)
public function IsolatedStorageFileStream (
    path : String, 
    mode : FileMode, 
    access : FileAccess, 
    share : FileShare, 
    bufferSize : int
)

パラメータ

path

分離ストレージ内でのファイル相対パス

mode

FileMode 値の 1 つ

access

FileAccess 値のビットごとの組み合わせ

share

FileShare 値のビットごとの組み合わせ

bufferSize

FileStream のバッファ サイズ

例外例外
例外種類条件

ArgumentException

path形式正しくありません。

ArgumentNullException

pathnull 参照 (Visual Basic では Nothing) です。

FileNotFoundException

modeOpen設定されていますが、ファイルが見つかりません。

解説解説
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IsolatedStorageFileStream クラス
IsolatedStorageFileStream メンバ
System.IO.IsolatedStorage 名前空間

IsolatedStorageFileStream コンストラクタ

IsolatedStorageFileStream クラス新しインスタンス初期化します。IsolatedStorageFileStream を開く唯一の方法は、そのコンストラクタ1 つ使用することです。
オーバーロードの一覧オーバーロードの一覧

名前 説明
IsolatedStorageFileStream (String, FileMode) 指定した mode で、path によって指定されファイルへのアクセス与えIsolatedStorageFileStream オブジェクト新しインスタンス初期化します。
IsolatedStorageFileStream (String, FileMode, FileAccess) mode指定したモードで、path指定したファイルへの、access指定した種類アクセス提供するIsolatedStorageFileStream クラス新しインスタンス初期化します。
IsolatedStorageFileStream (String, FileMode, IsolatedStorageFile) mode指定したモードisf指定した IsolatedStorageFile のコンテキスト使用してpath指定したファイルへのアクセス提供する IsolatedStorageFileStream クラス新しインスタンス初期化します。
IsolatedStorageFileStream (String, FileMode, FileAccess, FileShare) mode指定したモードshare指定した共有モード使用してpath指定したファイルへの、access指定した種類アクセス提供する IsolatedStorageFileStream クラス新しインスタンス初期化します。
IsolatedStorageFileStream (String, FileMode, FileAccess, IsolatedStorageFile) mode指定したモードisf指定した IsolatedStorageFileコンテキスト使用してpath指定したファイルへの、access指定した種類アクセス提供する IsolatedStorageFileStream クラス新しインスタンス初期化します。
IsolatedStorageFileStream (String, FileMode, FileAccess, FileShare, Int32) mode指定したモードshare指定したファイル共有モードbuffersize指定したバッファ サイズ使用してpath指定したファイルへの、access指定した種類アクセス提供する IsolatedStorageFileStream クラス新しインスタンス初期化します。
IsolatedStorageFileStream (String, FileMode, FileAccess, FileShare, IsolatedStorageFile) mode指定したモードshare指定したファイル共有モードisf指定した IsolatedStorageFileコンテキスト使用してpath指定したファイルへの、access指定した種類アクセス提供する IsolatedStorageFileStream クラス新しインスタンス初期化します。
IsolatedStorageFileStream (String, FileMode, FileAccess, FileShare, Int32, IsolatedStorageFile) mode指定したモードshare指定したファイル共有モードbuffersize指定したバッファ サイズisf指定した IsolatedStorageFileコンテキスト使用してpath指定したファイルへの、access指定した種類アクセス提供する IsolatedStorageFileStream クラス新しインスタンス初期化します。
参照参照

関連項目

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

IsolatedStorageFileStream コンストラクタ (String, FileMode, FileAccess, IsolatedStorageFile)

mode指定したモードisf指定した IsolatedStorageFileコンテキスト使用してpath指定したファイルへの、access指定した種類アクセス提供する IsolatedStorageFileStream クラス新しインスタンス初期化します。

名前空間: System.IO.IsolatedStorage
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    path As String, _
    mode As FileMode, _
    access As FileAccess, _
    isf As IsolatedStorageFile _
)
Dim path As String
Dim mode As FileMode
Dim access As FileAccess
Dim isf As IsolatedStorageFile

Dim instance As New IsolatedStorageFileStream(path,
 mode, access, isf)
public IsolatedStorageFileStream (
    string path,
    FileMode mode,
    FileAccess access,
    IsolatedStorageFile isf
)
public:
IsolatedStorageFileStream (
    String^ path, 
    FileMode mode, 
    FileAccess access, 
    IsolatedStorageFile^ isf
)
public IsolatedStorageFileStream (
    String path, 
    FileMode mode, 
    FileAccess access, 
    IsolatedStorageFile isf
)
public function IsolatedStorageFileStream (
    path : String, 
    mode : FileMode, 
    access : FileAccess, 
    isf : IsolatedStorageFile
)

パラメータ

path

分離ストレージ内でのファイル相対パス

mode

FileMode 値の 1 つ

access

FileAccess 値のビットごとの組み合わせ

isf

IsolatedStorageFileStream を開くために使用する IsolatedStorageFile。

例外例外
例外種類条件

ArgumentException

path形式正しくありません。

ArgumentNullException

pathnull 参照 (Visual Basic では Nothing) です。

FileNotFoundException

modeOpen設定されていますが、ファイルが見つかりません。

IsolatedStorageException

isfクォータ持っていません。

解説解説
使用例使用例

このコンストラクタ使用方法については、次のコード例参照してください。この例のコンテキスト全体については、IsolatedStorageFileStream概要参照してください

Dim isoFile As IsolatedStorageFile
isoFile = IsolatedStorageFile.GetUserStoreForDomain()

' Open or create a writable file.
Dim isoStream As New IsolatedStorageFileStream(Me.userName,
 FileMode.OpenOrCreate, _
    FileAccess.Write, isoFile)

Dim writer As New StreamWriter(isoStream)
writer.WriteLine(Me.NewsUrl)
writer.WriteLine(Me.SportsUrl)
' Calculate the amount of space used to record the user's preferences.
Dim d As Double = Convert.ToDouble(isoFile.CurrentSize)
 / Convert.ToDouble(isoFile.MaximumSize)
Console.WriteLine(("CurrentSize = " & isoFile.CurrentSize.ToString()))
Console.WriteLine(("MaximumSize = " & isoFile.MaximumSize.ToString()))
' StreamWriter.Close implicitly closes isoStream.
writer.Close()
isoFile.Dispose()
isoFile.Close()
Return d
IsolatedStorageFile isoFile;
isoFile = IsolatedStorageFile.GetUserStoreForDomain();

// Open or create a writable file.
IsolatedStorageFileStream isoStream =
    new IsolatedStorageFileStream(this.userName
,
    FileMode.OpenOrCreate,
    FileAccess.Write,
    isoFile);

StreamWriter writer = new StreamWriter(isoStream);
writer.WriteLine(this.NewsUrl);
writer.WriteLine(this.SportsUrl);
// Calculate the amount of space used to record the user's preferences.
double d = isoFile.CurrentSize / isoFile.MaximumSize;
Console.WriteLine("CurrentSize = " + isoFile.CurrentSize.ToString());
Console.WriteLine("MaximumSize = " + isoFile.MaximumSize.ToString());
// StreamWriter.Close implicitly closes isoStream.
writer.Close();
isoFile.Dispose();
isoFile.Close();
return d;
IsolatedStorageFile^ isoFile;
isoFile = IsolatedStorageFile::GetUserStoreForDomain();

// Open or create a writable file.
IsolatedStorageFileStream^ isoStream = gcnew IsolatedStorageFileStream( this->userName,FileMode::OpenOrCreate,FileAccess::Write,isoFile
 );
StreamWriter^ writer = gcnew StreamWriter( isoStream );
writer->WriteLine( this->NewsUrl );
writer->WriteLine( this->SportsUrl );

// Calculate the amount of space used to record the user's preferences.
double d = isoFile->CurrentSize / isoFile->MaximumSize;
Console::WriteLine( "CurrentSize = {0}", isoFile->CurrentSize.ToString()
 );
Console::WriteLine( "MaximumSize = {0}", isoFile->MaximumSize.ToString()
 );
writer->Close();
isoFile->Close();
isoStream->Close();
return d;

.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IsolatedStorageFileStream クラス
IsolatedStorageFileStream メンバ
System.IO.IsolatedStorage 名前空間

IsolatedStorageFileStream コンストラクタ (String, FileMode, FileAccess)

mode指定したモードで、path指定したファイルへの、access指定した種類アクセス提供する、IsolatedStorageFileStream クラス新しインスタンス初期化します。

名前空間: System.IO.IsolatedStorage
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    path As String, _
    mode As FileMode, _
    access As FileAccess _
)
Dim path As String
Dim mode As FileMode
Dim access As FileAccess

Dim instance As New IsolatedStorageFileStream(path,
 mode, access)
public IsolatedStorageFileStream (
    string path,
    FileMode mode,
    FileAccess access
)
public:
IsolatedStorageFileStream (
    String^ path, 
    FileMode mode, 
    FileAccess access
)
public IsolatedStorageFileStream (
    String path, 
    FileMode mode, 
    FileAccess access
)
public function IsolatedStorageFileStream (
    path : String, 
    mode : FileMode, 
    access : FileAccess
)

パラメータ

path

分離ストレージ内でのファイル相対パス

mode

FileMode 値の 1 つ

access

FileAccess 値のビットごとの組み合わせ

例外例外
例外種類条件

ArgumentException

path形式正しくありません。

ArgumentNullException

pathnull 参照 (Visual Basic では Nothing) です。

FileNotFoundException

modeOpen設定されていますが、ファイルが見つかりません。

解説解説
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IsolatedStorageFileStream クラス
IsolatedStorageFileStream メンバ
System.IO.IsolatedStorage 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「IsolatedStorageFileStream コンストラクタ」の関連用語

IsolatedStorageFileStream コンストラクタのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



IsolatedStorageFileStream コンストラクタのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS