Sinisterly
new and override - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Visual Basic & .NET Framework (https://sinister.li/Forum-Visual-Basic-NET-Framework)
+--- Thread: new and override (/Thread-new-and-override)

Pages: 1 2


new and override - Somebody00 - 01-05-2014

Hi all ,

could someone please explain me the difference between new and override keywords in c# , thank you Smile


RE: new and override - Slarek - 01-05-2014

http://msdn.microsoft.com/en-us/library/ms173153.aspx

http://social.msdn.microsoft.com/Forums/en-US/65e02299-300f-4b74-8f0a-679f490605f5/new-vs-override-?forum=Vsexpressvcs

http://stackoverflow.com/questions/1399127/c-new-versus-override


RE: new and override - Somebody00 - 01-05-2014

thank you verry much Smile


RE: new and override - hellomen - 01-05-2014

prety much sure this is also the wrong forum
even though c# is also .net based but still there is a forum for it:
http://www.hackcommunity.com/Forum-C-C-Objective-C-and-other-C-based


RE: new and override - ArkPhaze - 01-06-2014

(01-05-2014, 02:55 PM)hellomen Wrote: prety much sure this is also the wrong forum
even though c# is also .net based but still there is a forum for it:
http://www.hackcommunity.com/Forum-C-C-Objective-C-and-other-C-based

No... C# is not meant for that forum at all period. It's .NET, and it's not based on C, it's not C++, and it's not Objective-C either. It was based on Java, but that doesn't mean it belongs in the Java forum either.


RE: new and override - hellomen - 01-06-2014

(01-06-2014, 12:00 AM)ArkPhaze Wrote:
(01-05-2014, 02:55 PM)hellomen Wrote: prety much sure this is also the wrong forum
even though c# is also .net based but still there is a forum for it:
http://www.hackcommunity.com/Forum-C-C-Objective-C-and-other-C-based

No... C# is not meant for that forum at all period. It's .NET, and it's not based on C, it's not C++, and it's not Objective-C either. It was based on Java, but that doesn't mean it belongs in the Java forum either.

okay thanks for saying this.


RE: new and override - upsurt - 01-08-2014

override does exactly this -> overrides the original
new just hides the original, but the original is still there, so be careful


RE: new and override - Somebody00 - 01-09-2014

hmmm i don't think i understood this mate , but thanks for trying Smile) i hope i am not bothering you too much.


RE: new and override - upsurt - 01-09-2014

override
=> http://msdn.microsoft.com/en-us/library/ebca9ah3.aspx

new
=> http://msdn.microsoft.com/en-us/library/435f1dw2.aspx

also have a look at this
=> http://msdn.microsoft.com/en-us/library/ms173153.aspx
=> http://blogs.msdn.com/b/csharpfaq/archive/2004/03/12/what-s-the-difference-between-code-override-code-and-code-new-code.aspx

you're welcome


RE: new and override - Somebody00 - 01-09-2014

thaaank you once more Biggrin