Пример #1
0
    // Use this for initialization
    void Start()
    {
        //create and assign the delegate here
        AnonExpression delAnonExpression = delegate(string s)
        {
            Debug.Log(s);
        };              //observe the ; after the }

        //delegates content has been assigned
        //after it’s been assigned, we can use it.
        delAnonExpression("werid");
    }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        // create and assinne the delegate here
        AnonExpression delAnonExpression = delegate(string s)
        {
            Debug.Log(s);
        };

        // observe the ; after the }

        //deleage content has been assigned
        // affter it's been assinged , we can use it.

        delAnonExpression("Kasoma");
    }