CompilationSection.Explicit プロパティ

定義

Microsoft Visual Basic explicit コンパイル オプションを使用するかどうかを示す値を取得または設定します。

C#
[System.Configuration.ConfigurationProperty("explicit", DefaultValue=true)]
public bool Explicit { get; set; }

プロパティ値

Visual Basic true コンパイル オプションが有効な場合は explicit。それ以外の場合は falsefalse は、Visual Basic の explicit コンパイル オプションを無効にすることを指定します。 既定値は、true です。

属性

次のコード例では、 プロパティの使用方法を Explicit 示します。 このコード例は、CompilationSection クラスのために提供されている大規模な例の一部です。

C#
// Display Explicit property.
Console.WriteLine("Explicit: {0}",
  configSection.Explicit);

// Set Explicit property.
configSection.Explicit = true;

注釈

このプロパティは、Microsoft Visual Basic コンパイル オプションの設定をexplicit指定します。 に true設定すると、Visual Basic explicit のコンパイル オプションが有効になります。 オプションが有効になっている場合は、、、、または ReDim ステートメントを使用して、すべての変数をPublicDimPrivate明示的に宣言する必要があります。 既定値は、true です。

適用対象

製品 バージョン
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1