I have the following code:public abstract class BaseViewModel<PrimaryKey, ModelType>{    //Some base fields    public static List<T> Convert<T>(IEnumerable<ModelType> collection)         where T : BaseViewModel<PrimaryKey, ModelType>, new()    {        var list = new List<T>();        if (collection != null)        {            foreach (var item in collection)            {                var view = new T();                view.Value = item;                list.Add(view);            }        }        return list;    }}Of course, it works because it requires to I set a generic type.var list = GroupViewModel.Convert<GroupViewModel>(model);There is GroupViewModel extends from BaseViewModel. But how can I reduce this generic casting to it will get GroupViewModel type automaticaly when I call it so: var list = GroupViewModel.Convert(model);.Is it possible? Just I learn C# only.
Converting models into a list of ViewModels
c#;beginner;generics;iterator;mvvm