FileStream.Name プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > FileStream.Name プロパティの意味・解説 

FileStream.Name プロパティ

コンストラクタ渡されFileStream の名前を取得します

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

解説解説
使用例使用例

次のコード例は、FileStream(String,FileMode,FileAccess,FileShare,Int32,Boolean) コンストラクタ例の一部です。

Private Shared Sub EndReadCallback(asyncResult
 As IAsyncResult)
     Dim tempState As State = _
         DirectCast(asyncResult.AsyncState, State)
     Dim readCount As Integer
 = _
         tempState.FStream.EndRead(asyncResult)

     Dim i As Integer =
 0
     While(i < readCount)
         If(tempState.ReadArray(i) <> tempState.WriteArray(i))
             Console.WriteLine("Error writing data.")
             tempState.FStream.Close()
             Return
         End If
         i += 1
     End While

     Console.WriteLine("The data was written to {0} and "
 & _
         "verified.", tempState.FStream.Name)
     tempState.FStream.Close()

     ' Signal the main thread that the verification is finished.
     tempState.ManualEvent.Set()
 End Sub
static void EndReadCallback(IAsyncResult asyncResult)
{
    State tempState = (State)asyncResult.AsyncState;
    int readCount = tempState.FStream.EndRead(asyncResult);

    int i = 0;
    while(i < readCount)
    {
        if(tempState.ReadArray[i] != tempState.WriteArray[i++])
        {
            Console.WriteLine("Error writing data.");
            tempState.FStream.Close();
            return;
        }
    }
    Console.WriteLine("The data was written to {0} and verified.",
        tempState.FStream.Name);
    tempState.FStream.Close();

    // Signal the main thread that the verification is finished.
    tempState.ManualEvent.Set();
}
   static void EndReadCallback( IAsyncResult^
 asyncResult )
   {
      State^ tempState = dynamic_cast<State^>(asyncResult->AsyncState);
      int readCount = tempState->FStream->EndRead( asyncResult
 );
      int i = 0;
      while ( i < readCount )
      {
         if ( tempState->ReadArray[ i ] != tempState->WriteArray[
 i++ ] )
         {
            Console::WriteLine( "Error writing data." );
            tempState->FStream->Close();
            return;
         }
      }

      Console::WriteLine( "The data was written to {0} "
      "and verified.", tempState->FStream->Name );
      tempState->FStream->Close();
      
      // Signal the main thread that the verification is finished.
      tempState->ManualEvent->Set();
   }


public:

static void EndReadCallback(IAsyncResult asyncResult)
{
    State tempState = ((State)(asyncResult.get_AsyncState()));
    int readCount = tempState.get_FStream().EndRead(asyncResult);
    int i = 0;
    while((i < readCount)) {
        if ( tempState.get_ReadArray()[i] != 
                tempState.get_WriteArray()[i++] ) {
            Console.WriteLine("Error writing data.");
            tempState.get_FStream().Close();
            return;
        }
    }
    Console.WriteLine("The data was written to {0} and verified.",
        tempState.get_FStream().get_Name());
    tempState.get_FStream().Close();

    // Signal the main thread that the verification is finished.
    tempState.get_ManualEvent().Set();
} //EndReadCallback
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

「FileStream.Name プロパティ」の関連用語

FileStream.Name プロパティのお隣キーワード
検索ランキング

   

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



FileStream.Name プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS