Condividi tramite


Errore del compilatore C3354

'function': la funzione usata per creare un delegato non può avere un tipo restituito 'type'

Osservazioni:

I tipi seguenti non sono validi come tipi restituiti per un delegate:

  • Puntatore a funzione

  • Puntatore a membro

  • Puntatore a funzione membro

  • Riferimento a funzione

  • Riferimento a funzione membro

Example

L'esempio seguente genera l'errore C3354:

// C3354_2.cpp
// compile with: /clr /c
using namespace System;
typedef void ( *VoidPfn )();

delegate VoidPfn func(); // C3354
// try the following line instead
// delegate  void func();