using System; namespace delegate_test { delegate int PrintHandler( string message ); public static class Program { private static PrintHandler _print; private static Test _test; private static void Main(string[] args) { _test = new Test( ); _print = _test.Print; int res = _print( "Hello, World" ); Console.WriteLine( $"Return length of _print is {res}" ); } } public class Test { public int Print(string message) { Console.WriteLine( message ); return message.Length; } } }