Greeting.
I'm doing a project with a heavy amount of generics, and I was wondering what your opinions were on replacing GetType() on generic classes, like in the following example;
Is this a good way to do it or should I use some other name instead?Code:class MyClass<T> { public void SomeFunc(...) { ... } public new System.Type GetType() { return typeof(T); } }
Like e.g. GetGenericType() to enable getting the type of MyClass too, since the new GetType() replaces it with the type of T..?
Thanks in advance!