This blog shows on how to use an Extension Methods in C#
public static class myExtensionMethods
{
public static string ExistsMessage(this FileInfo f )
{
Console.WriteLine("FileInfo.Exists={0}", f.Exists);
Console.ReadLine();
return f.Exists.ToString();
}
}