How Inheritance works in C# : <p>I have a code </p>

<pre><code>using System;

namespace ExploreOOP
{
    class Program
    {
        static void Main(string[] args)
        {    
            Base1 b1 = new Derived1();
            Derived1 d1 = new Derived1();
            b1.write();
            d1.write();

            Console.WriteLine();
            Console.WriteLine();


            Base2 b2 = new Derived2();
            Derived2 d2 = new Derived2();
            b2.write();
            d2.write();


            Console.WriteLine();
            Console.WriteLine();

            Base3 b3 = new Derived3();
            Derived3 d3 = new Derived3();
            b3.write();
            d3.write();

            Console.ReadKey();

        }
    }

    public class Base1
    {
        public void write()
        {
            Console.WriteLine("Inside Base1 class");
        }
    }

    public class Derived1 : Base1
    {
        public void write()
        {
            Console.WriteLine("Inside Derived1 class");
        }
    }

    public class Base2
    {
        public virtual void write()
        {
            Console.WriteLine("Inside Base2 class");
        }
    }

    public class Derived2 : Base2
    {
        public override void write()
        {
            Console.WriteLine("Inside Derived2 class");
        }
    }

    public class Base3
    {
        public void write()
        {
            Console.WriteLine("Inside Base3 class");
        }
    }

    public class Derived3 : Base3
    {
        new public void write()
        {
            Console.WriteLine("Inside Derived3 class");
        }
    }

}
</code></pre>

<p>and it outputs,</p>

<pre><code>Inside Base1 class
Inside Derived1 class


Inside Derived2 class
Inside Derived2 class


Inside Base3 class
Inside Derived3 class
</code></pre>

<p>So my question is, </p>

<pre><code>public class Base1
{
    public void write()
    {
        Console.WriteLine("Inside Base1 class");
    }
}

public class Derived1 : Base1
{
    public void write()
    {
        Console.WriteLine("Inside Derived1 class");
    }
}
</code></pre>

<p>and </p>

<pre><code>public class Base3
{
    public void write()
    {
        Console.WriteLine("Inside Base3 class");
    }
}

public class Derived3 : Base3
{
    new public void write()
    {
        Console.WriteLine("Inside Derived3 class");
    }
}
</code></pre>

<p>does the same thing?</p>
