score:12

Accepted answer
var isAllInts = lst.All(x => x is int);

score:2

As @Igor Mentioned You can do this

var isAllInts = lst.All(x => x is int);

But just incase you want to see if the string is an int aswell you can

int testVal = 0;
var isAllInts = lst.All(x => int.TryParse(x.ToString(), out testVal));

Related Articles