Sayfalar

29 Ağustos 2019 Perşembe

Action


Void metotları çalıştırmak üzere tasarlanmış bir mimaridir. Gönderilen kod bloğunu yada metotu çalıştırır.

MyAction(() =>
{
    SayHello();  //Sonuç "Hello"
});
 
 
 void MyAction(Action action)
{
    try
    {
        action.Invoke();
    }
    catch (Exception ex)
    {
 
        Console.WriteLine(ex.Message);
    }
}
 
 
 void SayHello()
{
    Console.WriteLine("Hello");
}

MVC LOADING TOO SLOW ISSUE