以下の内容はhttps://mochimoffu.hateblo.jp/entry/2019/10/10/003000より取得しました。


C#の話~メンバに付いてる「=>」って何?~

ufcpp.net
expression-bodied なプロパティ

という物らしい。

簡単に言えば、getプロパティを簡単に記述したもの。
getのみであれば、この記法が使える。

public class Test3 : MonoBehaviour
{
    private int XValue = 5;
    private int YValue = 3;

    public int Value { get { return XValue + YValue; } }
    public int Value2 => XValue - YValue;
    // Start is called before the first frame update
    void Start()
    {
        Debug.Log(Value);   // 8
        Debug.Log(Value2);  // 2
    }
}





以上の内容はhttps://mochimoffu.hateblo.jp/entry/2019/10/10/003000より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14