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))]
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))]
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.