नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'type1': cannot inherit from 'type2', value types can only inherit from interface classes
Remarks
A value type cannot inherit a base class. For more information, see Classes and Structs.
Example
The following example generates C3830:
// C3830a.cpp
// compile with: /clr /c
public value struct MyStruct4 {
int i;
};
public value class MyClass : public MyStruct4 {}; // C3830
// OK
public interface struct MyInterface4 {
void i();
};
public value class MyClass2 : public MyInterface4 {
public:
virtual void i(){}
};