I'm new to using generic classes. Here is my question:
I have several enumerations like: x.PlatformType, y.PlatformType, z.PlatformType etc...
public class Helper<T>
{
public T GetPlatformType(Type type)
{
switch (System.Configuration.ConfigurationManager.AppSettings["Platform"])
{
case "DVL":
return // if type is x.PlatformType I want to return x.PlatformType.DVL
// if type is y.PlatformType I want to return y.PlatformType.DVL
// etc
default:
return null;
}
}
}
Is it possible to develop a method like this?
Thank in advance,