static void Main(string[] args)
        {
            ExtensionMethod1 ex = new ExtensionMethod1();

            ex.Demo1();
            ex.Demo2();
            ex.Demo3("veerababu");
            Console.WriteLine(Math.Sqrt(9));
            int i = 7;

            Console.WriteLine(i.prime());
            string s = "veerababu rallabandi";

            Console.WriteLine(s.reverse());



            //structure purpose
            structure st = new structure();

            st.show1();
            st.show2();
        }
Example #2
0
 public static void Demo3(this ExtensionMethod1 p, string s)
 {
     Console.WriteLine("I am Demo3 method in ExtensionMethod2 class " + s);
 }
Example #3
0
 public static void Demo2(this ExtensionMethod1 p)
 {
     Console.WriteLine("I am Demo2 method in ExtendsionMethod2 class");
 }