CompilerGlobalScopeAttribute Classe
Definizione
Indica che una classe deve essere gestita come se avesse ambito globale.Indicates that a class should be treated as if it has global scope.
public ref class CompilerGlobalScopeAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class CompilerGlobalScopeAttribute : Attribute
type CompilerGlobalScopeAttribute = class
inherit Attribute
Public Class CompilerGlobalScopeAttribute
Inherits Attribute
- Ereditarietà
- Attributi
Esempi
Nell'esempio di codice riportato di seguito viene illustrato CompilerGlobalScopeAttributecome applicare l'oggetto.The following code example demonstrates how to apply the CompilerGlobalScopeAttribute.
using System;
using System.Runtime.CompilerServices;
[CompilerGlobalScopeAttribute()]
class Program
{
static void Main(string[] args)
{
Console.WriteLine("The attribute was applied.");
}
}
Imports System.Runtime.CompilerServices
<CompilerGlobalScopeAttribute()> _
Module Program
Sub Main(ByVal args() As String)
Console.WriteLine("The attribute was applied.")
End Sub
End Module
Commenti
Questo attributo può essere applicato alle classi.You can apply this attribute to classes.
Questa classe viene utilizzata solo per la comunicazione con gli strumenti del debugger.This class is used only for communication with debugger tools.
Le classi in System.Runtime.CompilerServices sono destinate solo ai writer del compilatore.The classes in System.Runtime.CompilerServices are for compiler writers use only.
Costruttori
CompilerGlobalScopeAttribute() |
Inizializza una nuova istanza della classe CompilerGlobalScopeAttribute.Initializes a new instance of the CompilerGlobalScopeAttribute class. |
Proprietà
TypeId |
Quando è implementata in una classe derivata, ottiene un identificatore univoco della classe Attribute.When implemented in a derived class, gets a unique identifier for this Attribute. (Ereditato da Attribute) |
Metodi
Equals(Object) |
Restituisce un valore che indica se questa istanza è uguale a un oggetto specificato.Returns a value that indicates whether this instance is equal to a specified object. (Ereditato da Attribute) |
GetHashCode() |
Restituisce il codice hash per l'istanza.Returns the hash code for this instance. (Ereditato da Attribute) |
GetType() |
Ottiene l'oggetto Type dell'istanza corrente.Gets the Type of the current instance. (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.When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (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.When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Ereditato da Attribute) |
MemberwiseClone() |
Crea una copia superficiale dell'oggetto Object corrente.Creates a shallow copy of the current Object. (Ereditato da Object) |
ToString() |
Restituisce una stringa che rappresenta l'oggetto corrente.Returns a string that represents the current object. (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.Maps a set of names to a corresponding set of dispatch identifiers. (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.Retrieves the type information for an object, which can be used to get the type information for an interface. (Ereditato da Attribute) |
_Attribute.GetTypeInfoCount(UInt32) |
Recupera il numero delle interfacce di informazioni sul tipo fornite da un oggetto (0 o 1).Retrieves the number of type information interfaces that an object provides (either 0 or 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.Provides access to properties and methods exposed by an object. (Ereditato da Attribute) |