Answers for "FUN<T> delegate 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()
Posted by: Guest on March-18-2020
0

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
Posted by: Guest on January-20-2021

Code answers related to "Swift"

Browse Popular Code Answers by Language