'symbol': '__declspec(modifer)' 只能套用至全域對象或靜態數據成員的宣告或定義
備註
__declspec設計成只在全域範圍中使用的修飾詞是在函式中使用。
Example
下列範例會產生 C2505:
// C2505.cpp
// compile with: /clr
// OK
__declspec(process) int ii;
__declspec(appdomain) int jj;
int main() {
__declspec(process) int i; // C2505
__declspec(appdomain) int j; // C2505
}