Question: If you declare an inheritance hierarchy where both the parent and child class have a static method of the same name and parameters\*, Visual Studio will raise warning [CS0108](http://msdn.microsoft.com/en-us/library/3s8070fc.aspx):

Example:

```
public class BaseClass
{
    public static void DoSomething()
    {
    }
}

public class SubClass : BaseClass
{
    public static void DoSomething()
    {
    }
}

```

`: warning CS0108: 'SubClass.DoSomething()' hides inherited member 'BaseClass.DoSomething()'. Use the new keyword if hiding was intended.`

Why is this considered method hiding? Neither method is involved in the inheritance hierarchy and can only be invoked by using the class name:

```
BaseClass.DoSomething();
SubClass.DoSomething();

```

or, unqualified in the class itself. In either case, there is no ambiguity as to which method is being called (i.e., no 'hiding').

\*Interestingly enough, the methods can differ by return type and still generate the same warning. However, if the method parameter types differ, the warning is not generated.

Please note that I am not trying to create an argument for or discuss static inheritance or any other such nonsense.

Answer: 
> 
> Why is this considered method hiding? Neither method is involved in the inheritance hierarchy and can only be invoked by using the class name.
> 
> 
> 

That is not true. You can call DoSomething from any inherited class name:

```
public Class A
{
     public static void C() {...}
}

public Class B: A
{

}

B.C() // Valid call!

```

That is why you are hiding C() if you declare the method with the same signature in B.

Hope this helps.
It's just a warning. The compiler just wants to make sure you intentionally used the same method name.