Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public delegate T Format<T>(T x);
- public delegate int FormatNumber();
- public delegate string FormatString(string x);
- class MainClass {
- static string name = "Kaca";
- public static void Main (string[] args) {
- // Format<string> f = x => x.ToUpper();
- // Console.WriteLine ( f(name) );
- Console.WriteLine
- (
- "Hello " + getName( x => x.ToUpper() )
- );
- }
- static string getName(FormatString format) {
- return format(name);
- }
- }
Add Comment
Please, Sign In to add comment