Extension Methods in C#

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();
        }
    }
Ebook Download
View all
Learn
View all