Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual C#
C# Reference
C# Compiler Options
C# Compiler Errors
 Compiler Error CS0536
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual C# Reference: Errors and Warnings 
Compiler Error CS0536 

Error Message

'class' does not implement interface member 'interface member'. 'class member' is static, not public, or has the wrong return type

' class ' does not implement interface member ' member1 '. ' member2 ' is either static, not public, or has the wrong return type.

The compiler did not detect an interface member implementation. A declaration may be present that almost implements the interface member. Check for the following syntax errors in the declaration for the interface member:

  • public keyword is omitted.

  • Return type does not match.

  • static keyword is present.

The following sample generates CS0536:

// CS0536.cs
public interface a
{
   void f();
}

public class b : a
{
   public static int f()   // CS0536
   // try the following line instead
   // public void f()
   {
   }

   public static void Main()
   {
   }
}
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker