-1

Just wondering if you could constraint the type parameter on a class or a method in c# to be anything but some type. Googled and nothing seems to come up.

Thanks in advance.

Ling Xing
  • 181
  • 2
  • 14

1 Answers1

1

No, you can't. You can see a list of valid type constraints on MSDN.

Tim S.
  • 55,448
  • 7
  • 96
  • 122