using System;
using System.Collections.Generic;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
try
{
int n = 10;
var list = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 };
if (list.Contains(n))
Console.WriteLine("{0} in the list", n);
n = 50;
if (list.Contains(n))
Console.WriteLine("{0} in the list", n);
else
Console.WriteLine("{0} not in the list", n);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
}
/*
run:
10 in the list
50 not in the list
*/