Regex.CompileToAssemblyとは? わかりやすく解説

Regex.CompileToAssembly メソッド (RegexCompilationInfo[], AssemblyName, CustomAttributeBuilder[], String)

指定した 1 つ以上の Regex オブジェクトと指定した 1 つのリソース ファイルをコンパイルして、指定した属性を持つ名前付きアセンブリに保存します。

名前空間: System.Text.RegularExpressions
アセンブリ: System (system.dll 内)
構文構文

Public Shared Sub CompileToAssembly
 ( _
    regexinfos As RegexCompilationInfo(), _
    assemblyname As AssemblyName, _
    attributes As CustomAttributeBuilder(), _
    resourceFile As String _
)
Dim regexinfos As RegexCompilationInfo()
Dim assemblyname As AssemblyName
Dim attributes As CustomAttributeBuilder()
Dim resourceFile As String

Regex.CompileToAssembly(regexinfos, assemblyname, attributes, resourceFile)
public static void CompileToAssembly
 (
    RegexCompilationInfo[] regexinfos,
    AssemblyName assemblyname,
    CustomAttributeBuilder[] attributes,
    string resourceFile
)
public:
static void CompileToAssembly (
    array<RegexCompilationInfo^>^ regexinfos, 
    AssemblyName^ assemblyname, 
    array<CustomAttributeBuilder^>^ attributes, 
    String^ resourceFile
)
public static void CompileToAssembly
 (
    RegexCompilationInfo[] regexinfos, 
    AssemblyName assemblyname, 
    CustomAttributeBuilder[] attributes, 
    String resourceFile
)
public static function CompileToAssembly
 (
    regexinfos : RegexCompilationInfo[], 
    assemblyname : AssemblyName, 
    attributes : CustomAttributeBuilder[], 
    resourceFile : String
)

パラメータ

regexinfos

コンパイルする正規表現を記述する RegexCompilationInfo オブジェクトの配列。

assemblyname

アセンブリのファイル名。

attributes

アセンブリの属性を記述する CustomAttributeBuilder オブジェクトの配列。

resourceFile

アセンブリに含める Win32 リソース ファイルの名前。

例外例外
例外の種類条件

ArgumentNullException

assemblyname または regexinfos が null 参照 (Visual Basic では Nothing) です。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Regex.CompileToAssembly メソッド (RegexCompilationInfo[], AssemblyName)

1 つ以上の指定した Regex オブジェクトをコンパイルして名前付きファイルに保存します。

名前空間: System.Text.RegularExpressions
アセンブリ: System (system.dll 内)
構文構文

Public Shared Sub CompileToAssembly
 ( _
    regexinfos As RegexCompilationInfo(), _
    assemblyname As AssemblyName _
)
Dim regexinfos As RegexCompilationInfo()
Dim assemblyname As AssemblyName

Regex.CompileToAssembly(regexinfos, assemblyname)
public static void CompileToAssembly
 (
    RegexCompilationInfo[] regexinfos,
    AssemblyName assemblyname
)
public:
static void CompileToAssembly (
    array<RegexCompilationInfo^>^ regexinfos, 
    AssemblyName^ assemblyname
)
public static void CompileToAssembly
 (
    RegexCompilationInfo[] regexinfos, 
    AssemblyName assemblyname
)
public static function CompileToAssembly
 (
    regexinfos : RegexCompilationInfo[], 
    assemblyname : AssemblyName
)

パラメータ

regexinfos

コンパイルする正規表現を記述する RegexCompilationInfo オブジェクトの配列。

assemblyname

アセンブリのファイル名。

例外例外
例外の種類条件

ArgumentNullException

assemblyname または regexinfos が null 参照 (Visual Basic では Nothing) です。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Regex.CompileToAssembly メソッド (RegexCompilationInfo[], AssemblyName, CustomAttributeBuilder[])

1 つ以上の指定した Regex オブジェクトをコンパイルして、指定した属性を持つ名前付きファイルに保存します。

名前空間: System.Text.RegularExpressions
アセンブリ: System (system.dll 内)
構文構文

Public Shared Sub CompileToAssembly
 ( _
    regexinfos As RegexCompilationInfo(), _
    assemblyname As AssemblyName, _
    attributes As CustomAttributeBuilder() _
)
Dim regexinfos As RegexCompilationInfo()
Dim assemblyname As AssemblyName
Dim attributes As CustomAttributeBuilder()

Regex.CompileToAssembly(regexinfos, assemblyname, attributes)
public static void CompileToAssembly
 (
    RegexCompilationInfo[] regexinfos,
    AssemblyName assemblyname,
    CustomAttributeBuilder[] attributes
)
public:
static void CompileToAssembly (
    array<RegexCompilationInfo^>^ regexinfos, 
    AssemblyName^ assemblyname, 
    array<CustomAttributeBuilder^>^ attributes
)
public static void CompileToAssembly
 (
    RegexCompilationInfo[] regexinfos, 
    AssemblyName assemblyname, 
    CustomAttributeBuilder[] attributes
)
public static function CompileToAssembly
 (
    regexinfos : RegexCompilationInfo[], 
    assemblyname : AssemblyName, 
    attributes : CustomAttributeBuilder[]
)

パラメータ

regexinfos

コンパイルする正規表現を記述する RegexCompilationInfo オブジェクトの配列。

assemblyname

アセンブリのファイル名。

attributes

アセンブリの属性を記述する CustomAttributeBuilder オブジェクトの配列。

例外例外
例外の種類条件

ArgumentNullException

assemblyname または regexinfos が null 参照 (Visual Basic では Nothing) です。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Regex.CompileToAssembly メソッド

正規表現をコンパイルして、ディスク上の単一のアセンブリに保存します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
Regex.CompileToAssembly (RegexCompilationInfo[], AssemblyName) 1 つ以上の指定した Regex オブジェクトをコンパイルして名前付きファイルに保存します。
Regex.CompileToAssembly (RegexCompilationInfo[], AssemblyName, CustomAttributeBuilder[]) 1 つ以上の指定した Regex オブジェクトをコンパイルして、指定した属性を持つ名前付きファイルに保存します。
Regex.CompileToAssembly (RegexCompilationInfo[], AssemblyName, CustomAttributeBuilder[], String) 指定した 1 つ以上の Regex オブジェクトと指定した 1 つのリソース ファイルをコンパイルして、指定した属性を持つ名前付きアセンブリに保存します。
参照参照

関連項目

Regex クラス
Regex メンバ
System.Text.RegularExpressions 名前空間



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「Regex.CompileToAssembly」の関連用語

Regex.CompileToAssemblyのお隣キーワード
検索ランキング

   

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



Regex.CompileToAssemblyのページの著作権

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

©2026 GRAS Group, Inc.RSS