Re: Difference between C#'s "new" keyword and VB.NET's "shadows" keyword
From: Frans Bouma [C# MVP] (perseus.usenetNOSPAM_at_xs4all.nl)
Date: 08/28/04
- Next message: Fei Li: "call base() wrong, why?"
- Previous message: Jochen Kalmbach: "Re: Manualy Free Ram up"
- In reply to: Dot net work: "Difference between C#'s "new" keyword and VB.NET's "shadows" keyword"
- Next in thread: Jochen Kalmbach: "Re: Difference between C#'s "new" keyword and VB.NET's "shadows" keyword"
- Reply: Jochen Kalmbach: "Re: Difference between C#'s "new" keyword and VB.NET's "shadows" keyword"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 28 Aug 2004 10:49:32 -0700
Dot net work wrote:
> I need VB.NET's "shadows" functionality inside a C# project.
>
> I tried the "new" keyword, but it didn't seem to work, because my
> particular function does in fact differ in signature to the function
> that is being hidden in the base class.
>
> In VB.NET, the shadows keyword hides all the inherited functions,
> regardless of signature.
>
> I need this functionality in C#.
>
> I'm sure there's an easy way around this, but I am a VB.NET
> programmer, and not a C# programmer.
Even though shadows seems to hide it, it isn't hidden. Everyone can reach
the base class methods through reflection.
FB
-- Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com My .NET Blog: http://weblogs.asp.net/fbouma Microsoft C# MVP
- Next message: Fei Li: "call base() wrong, why?"
- Previous message: Jochen Kalmbach: "Re: Manualy Free Ram up"
- In reply to: Dot net work: "Difference between C#'s "new" keyword and VB.NET's "shadows" keyword"
- Next in thread: Jochen Kalmbach: "Re: Difference between C#'s "new" keyword and VB.NET's "shadows" keyword"
- Reply: Jochen Kalmbach: "Re: Difference between C#'s "new" keyword and VB.NET's "shadows" keyword"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|