ResourceWriter クラスとは? わかりやすく解説

ResourceWriter クラス

システム既定形式で、リソース出力ファイルまたは出力ストリーム書き込みます。このクラス継承できません。

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

<ComVisibleAttribute(True)> _
Public NotInheritable Class
 ResourceWriter
    Implements IResourceWriter, IDisposable
Dim instance As ResourceWriter
[ComVisibleAttribute(true)] 
public sealed class ResourceWriter : IResourceWriter,
 IDisposable
[ComVisibleAttribute(true)] 
public ref class ResourceWriter sealed : IResourceWriter,
 IDisposable
/** @attribute ComVisibleAttribute(true) */ 
public final class ResourceWriter implements
 IResourceWriter, IDisposable
ComVisibleAttribute(true) 
public final class ResourceWriter implements
 IResourceWriter, IDisposable
解説解説
使用例使用例

myResources.resources ファイルいくつかの文字列書き込む例を次に示します

Imports System
Imports System.Resources

Public Class WriteResources
    
    Public Shared Sub Main()
        
        ' Creates a resource writer.
        Dim writer As New
 ResourceWriter("myResources.resources")
        
        ' Adds resources to the resource writer.
        writer.AddResource("String 1", "First
 String")
        
        writer.AddResource("String 2", "Second
 String")
        
        writer.AddResource("String 3", "Third
 String")
        
        ' Writes the resources to the file or stream, and closes it.
        writer.Close()
    End Sub
End Class
using System;
using System.Resources;


public class WriteResources {
   public static void Main(string[]
 args) {
      
      // Creates a resource writer.
      IResourceWriter writer = new ResourceWriter("myResources.resources");
    
      // Adds resources to the resource writer.
      writer.AddResource("String 1", "First String");

      writer.AddResource("String 2", "Second String");

      writer.AddResource("String 3", "Third String");

      // Writes the resources to the file or stream, and closes it.
      writer.Close();
   }
}
using namespace System;
using namespace System::Resources;
int main()
{
   
   // Creates a resource writer.
   IResourceWriter^ writer = gcnew ResourceWriter( "myResources.resources"
 );
   
   // Adds resources to the resource writer.
   writer->AddResource( "String 1", "First String" );
   writer->AddResource( "String 2", "Second String" );
   writer->AddResource( "String 3", "Third String" );
   
   // Writes the resources to the file or stream, and closes it.
   writer->Close();
}

import System.*;
import System.Resources.*;

public class WriteResources
{
    public static void main(String[]
 args)
    {
        // Creates a resource writer.
        IResourceWriter writer = new ResourceWriter("myResources.resources");

        // Adds resources to the resource writer.
        writer.AddResource("String 1", "First String");
        writer.AddResource("String 2", "Second String");
        writer.AddResource("String 3", "Third String");

        // Writes the resources to the file or stream, and closes it.
        writer.Close();
    } //main
} //WriteResources
継承階層継承階層
System.Object
  System.Resources.ResourceWriter
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

「ResourceWriter クラス」の関連用語

ResourceWriter クラスのお隣キーワード
検索ランキング

   

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



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

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

©2025 GRAS Group, Inc.RSS