다음을 통해 공유


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

속성 값

Visual Basic 컴파일 옵션이 사용되면 그렇지 않으면 .입니다. 기본값은 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경우 컴파일은 데이터 손실이 발생하는 데이터 형식 변환과 숫자 형식과 문자열 간의 변환을 명시적으로 허용하지 않습니다.

적용 대상