नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
static constructor is not allowed to have a member initializer list
Remarks
A managed class cannot have a static constructor that also has a member initialization list. Static class constructors are called by the common language runtime to do class initialization, initializing static data members.
Example
The following example generates C3836:
// C3836a.cpp
// compile with: /clr
ref class M
{
static int s_i;
public:
static M() : s_i(1234) // C3836, delete initializer to resolve
{
}
};
int main()
{
}