Språk

CompilationSection.Strict Egenskap

Definition

Hämtar eller anger kompileringsalternativet 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

Egenskapsvärde

true om kompileringsalternativet Visual Basic strict används, annars false. Standardvärdet är true.

Attribut

Exempel

Följande kodexempel visar hur du använder egenskapen Strict . Det här kodexemplet är en del av ett större exempel för CompilationSection klassen.

// 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

Kommentarer

När truetillåter kompilering uttryckligen alla datatypskonverteringar där dataförlust skulle inträffa och eventuell konvertering mellan numeriska typer och strängar.

Gäller för