CompilationSection.Strict プロパティ

定義

Visual Basic strict コンパイル オプションを取得または設定します。

public:
 property bool Strict { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("strict", DefaultValue=false)]
public bool Strict { get; set; }
[<System.Configuration.ConfigurationProperty("strict", DefaultValue=false)>]
member this.Strict : bool with get, set
Public Property Strict As Boolean

プロパティ値

Boolean

Visual Basic true コンパイル オプションを使用する場合は strict。それ以外の場合は false。 既定値は、true です。

属性

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

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

// Set Strict property.
configSection.Strict = false;
' Display Strict property.
Console.WriteLine("Strict: {0}", _
 configSection.Strict)

' Set Strict property.
configSection.Strict = False

注釈

場合 true、コンパイルでは、データ損失が発生するデータ型の変換、および数値型と文字列間の変換が明示的に禁止されます。

適用対象