Compiler Error C2506
'member' : '__declspec(modifier)' cannot be applied to this symbol
You cannot declare per-process or per-appdomain for static members of a managed class.
See appdomain for more information.
Example
The following sample generates C2506.
// C2506.cpp
// compile with: /clr /c
ref struct R {
__declspec(process) static int n; // C2506
int o; // OK
};
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for