编译器错误 C2506
'member' : '__declspec(modifier)' 不能应用于此符号
不能为托管类的静态成员声明每个进程或每个 appdomain。
有关更多信息,请参见 appdomain 。
示例
以下示例生成 C2506。
// C2506.cpp
// compile with: /clr /c
ref struct R {
__declspec(process) static int n; // C2506
int o; // OK
};
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈