ContractOptionAttribute Constructors
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Initialiseert een nieuw exemplaar van de ContractOptionAttribute klasse.
Overloads
| Name | Description |
|---|---|
| ContractOptionAttribute(String, String, Boolean) |
Initialiseert een nieuw exemplaar van de ContractOptionAttribute klasse met behulp van de opgegeven categorie, instelling en in-/uitschakelen waarde. |
| ContractOptionAttribute(String, String, String) |
Initialiseert een nieuw exemplaar van de ContractOptionAttribute klasse met behulp van de opgegeven categorie, instelling en waarde. |
ContractOptionAttribute(String, String, Boolean)
- Bron:
- Contracts.cs
- Bron:
- Contracts.cs
- Bron:
- Contracts.cs
- Bron:
- Contracts.cs
- Bron:
- Contracts.cs
Initialiseert een nieuw exemplaar van de ContractOptionAttribute klasse met behulp van de opgegeven categorie, instelling en in-/uitschakelen waarde.
public:
ContractOptionAttribute(System::String ^ category, System::String ^ setting, bool enabled);
public ContractOptionAttribute(string category, string setting, bool enabled);
new System.Diagnostics.Contracts.ContractOptionAttribute : string * string * bool -> System.Diagnostics.Contracts.ContractOptionAttribute
Public Sub New (category As String, setting As String, enabled As Boolean)
Parameters
- category
- String
De categorie voor de optie die moet worden ingesteld.
- setting
- String
De optie-instelling.
- enabled
- Boolean
true om de optie in te schakelen; false om de optie uit te schakelen.
Van toepassing op
ContractOptionAttribute(String, String, String)
- Bron:
- Contracts.cs
- Bron:
- Contracts.cs
- Bron:
- Contracts.cs
- Bron:
- Contracts.cs
- Bron:
- Contracts.cs
Initialiseert een nieuw exemplaar van de ContractOptionAttribute klasse met behulp van de opgegeven categorie, instelling en waarde.
public:
ContractOptionAttribute(System::String ^ category, System::String ^ setting, System::String ^ value);
public ContractOptionAttribute(string category, string setting, string value);
new System.Diagnostics.Contracts.ContractOptionAttribute : string * string * string -> System.Diagnostics.Contracts.ContractOptionAttribute
Public Sub New (category As String, setting As String, value As String)
Parameters
- category
- String
De categorie van de optie die moet worden ingesteld.
- setting
- String
De optie-instelling.
- value
- String
De waarde voor de instelling.
Opmerkingen
Er zijn slechts twee categorie-/instellingsopties en ze kunnen worden ingesteld door een van de constructoroverbelastingen. U kunt deze overbelasting gebruiken met dezelfde instellingen als de ContractOptionAttribute(String, String, Boolean) overbelasting door 'true' of 'false' op te geven in tekenreeksindeling, bijvoorbeeld:
[ContractOption("contract", "inheritance", "false")]
class MyConcurrentList<T> : IList<T> {
...
}