Compiler Error C3155
attributes are not allowed in a property indexer
An indexed property was declared incorrectly. For more information, see How to: Use Properties in C++/CLI.
Example
The following sample generates C3155.
// C3155.cpp
// compile with: /clr /c
using namespace System;
ref struct R {
property int F[[ParamArray] int] { // C3155
// try the following line instead
// property int F[ int] { // OK
int get(int i) {
return 0;
}
}
};
Pripomienky
https://aka.ms/ContentUserFeedback.
Pripravujeme: V priebehu roka 2024 postupne zrušíme službu Problémy v službe GitHub ako mechanizmus pripomienok týkajúcich sa obsahu a nahradíme ju novým systémom pripomienok. Ďalšie informácie nájdete na stránke:Odoslať a zobraziť pripomienky pre