I have the following method:
void Test<T>(T Result)
and I need to implement something like this:
if Result is null, or T is a bool and that bool is false
I tried to do something like
if (typeof(T) == typeof(bool)
{
if ((bool)Result == false) // doesn't work
if (Result as bool == false) // doesn't work
how can I implement this without creating two methods?