F
F
fan92rus2020-05-24 15:45:48
C++ / C#
fan92rus, 2020-05-24 15:45:48

How to store and call generic?

Inherited the generic type from the base type.
There is a collection of basic type.
I add generic there everything is OK.
But how now to get them and call the unique method?
That is unpacking to generic type turns out.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
2
2CHEVSKII, 2020-05-24
@fan92rus

Well, as trellis pointed out in the comments, without the code, it's really about nothing, but it seems to me that you are using generic classes incorrectly, since such a problem arises. All public methods should, in theory, be in an abstract form in the base class, and the generic should contain a type-specific implementation. This is in the general case.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question