नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
delegate constructor: member function 'function' cannot be called on an instance of type 'type'
Remarks
A call was made to a function through a pointer to a type that does not contain the function.
Example
The following example generates C3754:
// C3754a.cpp
// compile with: /clr
using namespace System;
delegate void MyDel();
interface class MyInterface {};
ref struct MyClass : MyInterface {
void f() {}
};
int main() {
MyInterface^ p = gcnew MyClass;
MyDel^ q = gcnew MyDel(p, &MyClass::f); // C3754
// try the following line instead
// MyDel^ q = gcnew MyDel(safe_cast<MyClass^>(p), &MyClass::f);
}