FUN<T> delegate example

Example 1: how to call app delegate function in swift

// get a reference to the app delegate
guard let let appDelegate: AppDelegate? = UIApplication.shared.delegate as? AppDelegate else { return }

// call function
appDelegate.someFunc()

Example 2: c# delegate func

Func<string, string> convert = delegate(string s)
    { return s.ToUpper();};

 string name = "Dakota";
 Console.WriteLine(convert(name));

// This code example produces the following output:
//
//    DAKOTA