Re: Implementing Interfaces in C#

From: Richard A. Lowe (chadich_at_yumspamyumYahoo.com)
Date: 02/16/04


Date: Sun, 15 Feb 2004 19:42:22 -0600

Hi Frank, It's would be best to post the source (pref a simplified version)
that you believe to be compiling without errors. As others have noted you
should see compile errors if an interface method is not implemented.

Richard

-- 
C#, .NET and Complex Adaptive Systems:
http://blogs.geekdojo.net/Richard
"Frank J. Reashore" <reashore@NOSPAMTelus.net> wrote in message
news:OKX6aNC9DHA.3404@TK2MSFTNGP09.phx.gbl...
> Hello Everyone,
>
> I am implementing a simple interface in C# using Visual Studio .net and
was
> quite surprised to discover that the C# compiler does NOT complain if a
> method on the interface is not implemented.
>
> VB.net on the other hand generates a compile error if a method is not
> implemented. This helps in ensuring that all interface methods are
> implemented.
>
> The fact that C# does not provide such compile errors makes implementing
and
> interface in C# more labor intensive than in VB.net. You have to use the
> object browser and check the function signature, etc.
>
> Is this normal behavior? Could I possibly be doing something wrong?
>
> Any help would be appreciated.
>
> Regards,
> Frank J. Reashore
>
> Vancouver, Canada
>
>
>
>
>
>
>


Relevant Pages

  • Re: Code Editor shortcut to add methods of Interface?
    ... > Class completion will work across units, as long as you put the ... If you have the interface method already declared, ... doesn't make any difference whether you attempt to compile or not. ...
    (borland.public.delphi.ide)
  • Re: creaping coupling......
    ... but it is a more strict contract than required. ... "I am capable of implementing things via interface XYZ i.e. ... consider specifically that we compile, deploy and then we delete a method to ... IWriteable pipe = new Pipe; ...
    (comp.object)
  • Re: ActiveX.exe question
    ... > the public interface still need registered in order to use them. ... Compile AXExe.exe against a Share on the TestPC ... Open a Standard-Exe-Project on your DevelopPC and name it AXTest ... Compile AXTest.exe against the Share on the TestPC ...
    (microsoft.public.vb.general.discussion)
  • Re: RAD vs. performance
    ... thus they fulfull the number interface and can be used interchangeably. ... I'm not about to ditch statically typed languages ... Because you need whole-program optimisation for a start. ... The benefits of static typing come at compile time. ...
    (comp.lang.misc)
  • Re: Is Direct3D a rip-off of OpenGL?
    ... People who think that a method change in a NEW INTERFACE in DirectX really ... Moving to use a NEW INTERFACE, ... > ago simply isn't going to compile with the latest SDK, ...
    (comp.graphics.api.opengl)