Why FileNotFound Exception throws when passing null in function argument? C#?

Arun K

New member
Can anyone say why "FileNotFound Exception" throw here?
code snipptet is:

using System;
using System.IO;
namespace ab
{
class Program
{
public static void Main()
{

showMsg(string.Empty);
}
public static void showMsg(Object o){ Console.WriteLine("Object occur");}
public static void showMsg(FileNotFoundException f){

Console.WriteLine("FileNotFoundExceptionoccur");}
public static void showMsg(IOException f){ Console.WriteLine("IOExceptionoccur");}
}

}
 
Back
Top