K
K
KickMicro2018-05-29 20:06:31
C++ / C#
KickMicro, 2018-05-29 20:06:31

Why is comparison not possible?

5b0d88184ae8f585487556.png
Type T is created like this:
class Program<T>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Bashinsky, 2018-05-29
@KickMicro

Because under T there can be non-comparable values.
Specify what will be under T, for example:

class MyClass<T> where T :class
    {

    }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question