コンパイラ エラー CS0544
更新 : 2007 年 11 月
エラー メッセージ
プロパティ オーバーライド': '非プロパティ' はプロパティではないため、オーバーライドできません
非プロパティのデータ型をプロパティとしてオーバーライドしようとしましたが、この処理は許可されていません。
次の例では CS0544 エラーが生成されます。
// CS0544.cs
// compile with: /target:library
public class a
{
public int i;
}
public class b : a
{
public override int i { // CS0544
// try the following line instead
// public new int i {
get
{
return 0;
}
}
}