Errore del compilatore C2582
La funzione 'function' non è disponibile in 'type'
È stato effettuato un tentativo di assegnazione a un oggetto che non dispone di un operatore di assegnazione.
L'esempio seguente genera l'errore C2582:
// C2582.cpp
// compile with: /clr
using namespace System;
struct N {};
ref struct O {};
ref struct R {
property O prop; // C2582
property O ^ prop2; // OK
};
int main() {
String ^ st1 = gcnew String("");
^st1 = gcnew String(""); // C2582
st1 = "xxx"; // OK
}