I'm developing an application with .NET Framework 4.6.1 and C#.
I want to do this:
var val = actionArguments[key];
if (val is List<T> as class)
I want to check if val
is a List
of any kind of object but that statement doesn't compile.
How can I check if a variable declared as var is a List?
On my application var is List<Code>
. Code
is a custom class that I made. And List
is System.Generic.Collections
.