Re: private new void
- From: "Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 21 Dec 2005 18:50:03 -0500
JJ,
In this case, the new is not related to the return type of the method.
Rather, new is used to indicate that the method shadows a method with the
same signature declared on the base class.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
<jjmraz@xxxxxxxxxxx> wrote in message
news:1135207592.004619.294280@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I have seen some code recently that had the following method
> signatures:
>
> private new void Push(object o)
>
> And
>
> public new objectname FunctionName()
>
> So my question is what is happening here? With the first one why would
> new be with a void return type? With the second one I am assuming that
> the function would return a new object of that type, correct?
>
> JJ
>
.
- Follow-Ups:
- Re: private new void
- From: jjmraz
- Re: private new void
- References:
- private new void
- From: jjmraz
- private new void
- Prev by Date: Re: Garbage Collection Issues in long-standing services
- Next by Date: Re: ebXML & .NET ?
- Previous by thread: private new void
- Next by thread: Re: private new void
- Index(es):