using System;
namespace TOSTER
{
class Program
{
static void Main(string[] args)
{
var example = new Example("example 1", () => { return "Result"; });
var result = example.init();
Console.WriteLine(result);
Console.ReadKey();
}
}
class Example
{
private readonly string _name;
private readonly Func<string> _del;
public Example(string name, Func<string> callback)
{
_name = name;
_del = callback;
}
public string init()
{
return _del.Invoke();
}
}
}