編譯器錯誤 C2506
'member' : '__declspec(modifier)' 不可套用至這個符號
您不能為一個 Managed 類別的靜態成員宣告處理序專屬或 per-appdomain。
如需詳細資訊,請參閱 appdomain。
範例
下列範例會產生 C2506。
// C2506.cpp
// compile with: /clr /c
ref struct R {
__declspec(process) static int n; // C2506
int o; // OK
};