using System;
public class Program
{
public static void Main()
{
try{
GetImage(2);
}
catch(ArgumentException e){
Console.WriteLine( int.Parse(e.Message));
}
}
public static string GetImage(int index){
if(index == 1){ return "/img/1";}
throw new ArgumentException("5");
}
}
using System;
public class Program
{
public static void Main()
{
Object r = GetImage(1);
Check(r);
r = GetImage(2);
Check(r);
}
public static void Check(Object o){
if(o is String) Console.WriteLine("string");
if(o is int) Console.WriteLine("int");
else
Console.WriteLine(o.GetType());
}
public static Object GetImage(int index){
if(index == 1){ return "/img/1";}
return 5;
}
}