using System;
using System.Linq;
using System.Collections.Generic;
class Program
{
static void Main() {
var list = new List<object> { 3, 7, "c#", 8, "c", 99, 10, "c++", -5, 1, "java", 2 };
List<int> result = list.OfType<int>().ToList();
Console.WriteLine(String.Join(", ", result));
}
}
/*
run:
3, 7, 8, 99, 10, -5, 1, 2
*/