नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'var' : type data members can only be members of managed types
Remarks
An initonly data member was declared in a native class. An initonly data member can only be declared in a CLR class.
Example
The following example generates C3898:
// C3898.cpp
// compile with: /clr
struct Y1 {
initonly
static int data_var = 9; // C3898
};
Possible resolution:
// C3898b.cpp
// compile with: /clr /c
ref struct Y1 {
initonly
static int data_var = 9;
};