0

The problem is that C++/CLI doesn't have a typeof operator. So how can I translate the following C# code to C++/CLI?

[ExpectedException (typeof(ArgumentOutOfRangeException))]
Tom Blodget
  • 20,260
  • 3
  • 39
  • 72
jax
  • 728
  • 1
  • 11
  • 31

1 Answers1

1

This is the line that you are probably looking for:

[ExpectedException(ArgumentOutOfRangeException::typeid)]

The answer is taken from How do I use ExpectedException in C++/CLI NUnit tests? and you would have gotten it too if you did some searching online.

Community
  • 1
  • 1
Yuan Shing Kong
  • 674
  • 5
  • 15