check variable type

Hi all,

So, I have a function which is called with one argument - which is either an array OR a variable. But I can’t figure out how to check exactly what type the argument is (an array or a variable)?

I’m guess I’m looking for a sort of “variable.Type” attribute or something like that…

var p = 5;
if (p.GetType() == typeof(int))
	print("same");
2 Likes

Well, to quote Monty Python:

“Spot on, Chris.” :smile:

Thanks again :slight_smile: