I am a student and want to implement generic in my test project. Below is my code

```
class clsCallService
{
    public void CallServiceMethod(string serviceName)
    {
        if (serviceName == "WEB")
            Web_Service.AddData("4G", DateTime.Now, DateTime.Now, "test");
        else if (serviceName == "VOICE")
            Voice_Service.AddData("4G", DateTime.Now, DateTime.Now, "test");
        else if (serviceName == "VIDEO")
            Video_Service.AddData("4G", DateTime.Now, DateTime.Now, "test");
    }
}       

class Web_Service
{
    public static void AddData(string technology, DateTime SDate, DateTime EDate, String someVariable)
    { 
        //Call DAL method
    }
}

class Voice_Service
{
    public static void AddData(string technology, DateTime SDate, DateTime EDate, String someVariable)
    {
        //Call DAL method
    }
}

class Video_Service
{
    public static void AddData(string technology, DateTime SDate, DateTime EDate, String someVariable)
    {
        //Call DAL method
    }
}

```

Now, I want to create a generic class. In this class, there should be a generic method which has a generic parameter. So, I wouldn't need to write IF Condition like above. I just need to pass a object of any class and base of type, method will be called. I am trying to write some code but not able to do.

```
public class testGenericClass<T> where T : Web_Service, new()
{
    public void CallServiceMethod(string technology, DateTime SDate, DateTime EDate, String someVariable)
    {
        T.AddData(technology, SDate, EDate, someVariable);
    }
}

```

Please suggest. 

---

Updated after got some helpful replies --

Updated code 

```
public class createGenericClass<T> where T : IWebService,IVoiceService
{
    public void CallDoSomeThing(T t, int x, int y)
    {
        t.DoSomeThing(x, y);
    }

    public void CallDoSomeThingElse(T t, int a, float b)
    {
        t.DoSomeThingElse(a, b);
    }

}

public interface IWebService
{
    void DoSomeThing(int x, int y);        
}

public interface IVoiceService
{
    void DoSomeThingElse(int a, float b);
}

public class Web_Service : IWebService
{
    public void DoSomeThing(int x, int y)
    { }    
}    

public class Voice_Service : IVoiceService
{
    public void DoSomeThingElse(int a, float b)
    { }
}

```

Now, I have two different interfaces i.e. Web and Voice. Both have different functions. I have implemented it successfully but I am not able to call my method. I don't know how to call. Below Code (Just trying to create a new instance.)

```
class Program
{
    static void Main(string[] args)
    {
        createGenericClass<IWebService> obj = new createGenericClass<IWebService>();

    }
}

```

Please suggest.