1:supress the break keyword like:int var = 1;switch(var){case 0:case 1:case n://your stmt goes here;break;case 23://stmt;break;}2: Object = null;3: try put .ToString after the index.4: your can use return keyword.hope it helps