Question: I have a GenericController which has the following methods: 

```
public class GenericGridController<T, TKey>:Controller
    where T : class
    where TKey : IComparable
{
    string GetFilterParam();
    string GetGridPartialName();
    List<T> GetGridModel(TKey param);
    List<T> GetGridModel(T entity);
    ActionResult GetGrid(TKey param);
    ActionResult Add(T entity);
    ActionResult Edit(T entity);
    ActionResult Delete(T entity);
}

```

When ever I need to create a grid, I am creating a new controller, inherited from the GenericGridController and I need to override the GetFilterParam and GetGridParialName, to provide the specific names. 

This is working just fine. Now I want to not override the 2 methods, and:

I was trying to do "something which I do not understand":
 - I made 2 string properties in the generic controller
 - I initialized them from the constructor, something like: 

```
    public string FilterParam { get; set; }
    public string GridPartialName { get; set; }

    public GenericGridController(string filterParamName, string partialName)
    {
        FilterParam = filterParamName;
        GridPartialName = partialName;
    }

```

then I create a new TestController, inherited from the GenerigGridController, and I saw that he ask to implement the missing contructor, something like this: 

```
public class TestController : GenericGridController<Candidat,int>
    {
        public TestController(string filterParamName, string partialName)
            : base(filterParamName, partialName)
        {

        }        
    }

```

I was expecting to do something like this: 

```
 public class TestController : GenericGridController<Candidat,int>("param","PartialView"){}

```

My question is: How to provide the 2 parameters need it in the GenericGridController constructor. 

Maybe is a stupid question, I am just trying to understand how this works.

Answer: 
To restate my understanding of this issue: you are looking to pass static values to the base constructor from a derived class.

It looks like you attempted to do this in the class definition. This will not work. However, you can declare your own constructor and change the parameters. Here is an example:

```
public class TestController : GenericGridController<Candidat,int>
{
    public TestController()
        : base("param","PartialView")
    {

    }        
}

```

Now you can instantiate this class with `new TestController()` and it will automatically provide `"param"` and `"PartialView"` values to the base constructor for you.
I reckon you're looking for something like this:

```
public class TestController : GenericGridController<Candidat,int>
{
    public TestController()
        : base("param","PartialView")
    {

    }
}

```

Having defined a parameterless constructor, you can now create instances of TestController simply as `new TestController()`.

However, creating a whole another class only to hardcode different values for constructor parameters of a base class (or indeed override 2 getters to return some hardcoded value) is *questionable* to say the least.

> 
> I was expecting to do something like this:
> 
> 
> class TestController :
>  GenericGridController("param","PartialView"){}
> 
> 
> 

And this seems to show a lack of understanding on a deeper level. Constructor is invoked when creating an instance of a class, you cannot provide constructor parameters like this, in the declaration of the base class for `TestController`, as no instance is being created at this point.