ufcpp / UfcppSample

http://ufcpp.net/ 向けのサンプル
Apache License 2.0
133 stars 41 forks source link

"base" からの継承 #454

Closed Benshi closed 7 months ago

Benshi commented 8 months ago

https://ufcpp.net/study/csharp/start/st_scope/?p=3 「コンストラクター初期子」の解説のコードのところで

class Derived : base {

とありますが、 継承元に小文字 base は指定するとエラーになりました。 このようなコードでは如何でしょう。

class Base { public Base(out int a) { a = 0; } }
class Derived : Base
{
    public Derived(int a) : base(out var x)
    {
ufcpp commented 7 months ago

修正。