DiscardableAttribute Konstruktor
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
Inicializálja az osztály új példányát alapértelmezett DiscardableAttribute értékekkel.
public:
DiscardableAttribute();
public DiscardableAttribute();
Public Sub New ()
Példák
Az alábbi példakód bemutatja, hogyan alkalmazhatja az DiscardableAttribute attribútumot egy típusra.
using System;
using System.Runtime.CompilerServices;
[DiscardableAttribute()]
class Program
{
static void Main(string[] args)
{
Console.WriteLine("The DiscardableAttribute attribute was applied.");
}
}
Imports System.Runtime.CompilerServices
<DiscardableAttribute()> Module Program
Sub Main(ByVal args() As String)
Console.WriteLine("The DiscardableAttribute attribute was applied.")
End Sub
End Module