how to use static Method in MVC controller

Bathala.Ramesh430
Posted by Bathala.Ramesh430 under ASP.NET MVC category on | Points: 40 | Views : 570
public static class Base
{
public static string GetName()
{
return "My Name Ramesh";
}
}

this is my static method in Base class.

public class ApplicationController : Controller
{
// GET: Application
public ActionResult Index()
{
return View();
}

public void DisplayName()
{
string str;

// Here i want to use GetName method from base class by using inheritance concept like

str = GetName();
}
}

Please help me.

Comments or Responses

Login to post response