CompilationRelaxationsAttribute Classe

Definizione

Controlla l'accuratezza del codice generato dal compilatore JIT (just-in-time) di Common Language Runtime.

public ref class CompilationRelaxationsAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method | System.AttributeTargets.Module)]
public class CompilationRelaxationsAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Module)]
[System.Serializable]
public class CompilationRelaxationsAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method | System.AttributeTargets.Module)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public class CompilationRelaxationsAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method | System.AttributeTargets.Module)>]
type CompilationRelaxationsAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Module)>]
[<System.Serializable>]
type CompilationRelaxationsAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method | System.AttributeTargets.Module)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type CompilationRelaxationsAttribute = class
    inherit Attribute
Public Class CompilationRelaxationsAttribute
Inherits Attribute
Ereditarietà
CompilationRelaxationsAttribute
Attributi

Esempio

Nell'esempio seguente viene illustrato come applicare .CompilationRelaxationsAttribute

using System;
using System.Runtime.CompilerServices;

[assembly:CompilationRelaxationsAttribute(CompilationRelaxations.NoStringInterning)]

class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine("The CompilationRelaxationsAttribute attribute was applied.");
    }
}
Imports System.Runtime.CompilerServices

<Assembly: CompilationRelaxationsAttribute(CompilationRelaxations.NoStringInterning)> 

Module Program


    Sub Main(ByVal args() As String)
        Console.WriteLine("The CompilationRelaxationsAttribute attribute was applied.")
    End Sub


End Module

Commenti

Applicare l'attributo CompilationRelaxationsAttribute agli assembly per specificare i parametri di compilazione dell'assembly. Usare l'enumerazione CompilationRelaxations per specificare le opzioni di compilazione.

Questo attributo viene ignorato nella versione 1.0 di Microsoft .NET Framework.

Le classi in System.Runtime.CompilerServices sono destinate solo agli autori del compilatore.

Costruttori

CompilationRelaxationsAttribute(CompilationRelaxations)

Inizializza una nuova istanza della classe CompilationRelaxationsAttribute con il valore CompilationRelaxations specificato.

CompilationRelaxationsAttribute(Int32)

Inizializza una nuova istanza della classe CompilationRelaxationsAttribute con gli allentamenti di compilazione specificati.

Proprietà

CompilationRelaxations

Ottiene gli allentamenti di compilazione specificati quando è stato creato l'oggetto corrente.

TypeId

Quando è implementata in una classe derivata, ottiene un identificatore univoco della classe Attribute.

(Ereditato da Attribute)

Metodi

Equals(Object)

Restituisce un valore che indica se questa istanza è uguale a un oggetto specificato.

(Ereditato da Attribute)
GetHashCode()

Restituisce il codice hash per l'istanza.

(Ereditato da Attribute)
GetType()

Ottiene l'oggetto Type dell'istanza corrente.

(Ereditato da Object)
IsDefaultAttribute()

In caso di override in una classe derivata, indica se il valore di questa istanza è il valore predefinito per la classe derivata.

(Ereditato da Attribute)
Match(Object)

Quando è sottoposto a override in una classe derivata, restituisce un valore che indica se questa istanza equivale a un oggetto specificato.

(Ereditato da Attribute)
MemberwiseClone()

Crea una copia superficiale dell'oggetto Object corrente.

(Ereditato da Object)
ToString()

Restituisce una stringa che rappresenta l'oggetto corrente.

(Ereditato da Object)

Implementazioni dell'interfaccia esplicita

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

Esegue il mapping di un set di nomi a un set corrispondente di ID dispatch.

(Ereditato da Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

Recupera le informazioni sul tipo relative a un oggetto, che possono essere usate per ottenere informazioni sul tipo relative a un'interfaccia.

(Ereditato da Attribute)
_Attribute.GetTypeInfoCount(UInt32)

Recupera il numero delle interfacce di informazioni sul tipo fornite da un oggetto (0 o 1).

(Ereditato da Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

Fornisce l'accesso a proprietà e metodi esposti da un oggetto.

(Ereditato da Attribute)

Si applica a

Vedi anche