Hi all,
I´m creating a factory class and I don´t know if it´s better to create it
with Generics or not. The basic funcionality would be:
public static class DalcFactory<T>
public static T Instantiate()
{
if (typeof(T).Name.Equals("Example"))
return (T) Assembly.LoadFrom(...).CreateInstance(...);
}
Without generics, the class would contains inumerous static methods,
GetObject1, GetObject2, GetObject3, and others. With Generics, I would use
just one method, Instantiate, as above.
I want to know wich one is better, in performance.
Thanks!
André