नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'variable' : a symbol declared with __declspec(process) must be const in /clr:pure mode
Remarks
The /clr:pure and /clr:safe compiler options are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017.
By default, variables are per application domain under /clr:pure. A variable marked __declspec(process) under /clr:pure is prone to errors if modified in one application domain and read in another.
Therefore, the compiler enforces per process variables be const under /clr:pure, making them read only in all application domains.
For more information, see process and /clr (Common Language Runtime Compilation).
Example
The following example generates C2441.
// C2441.cpp
// compile with: /clr:pure /c
__declspec(process) int i; // C2441
__declspec(process) const int j = 0; // OK