Click here to Skip to main content
15,902,276 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
JokeRe: which one is faster and better coding Pin
Nemanja Trifunovic18-May-07 7:16
Nemanja Trifunovic18-May-07 7:16 
GeneralRe: which one is faster and better coding Pin
Juan Pablo G.C.23-May-07 0:29
Juan Pablo G.C.23-May-07 0:29 
GeneralRe: which one is faster and better coding Pin
maz233123-May-07 10:11
maz233123-May-07 10:11 
GeneralRe: which one is faster and better coding Pin
KarstenK23-May-07 23:01
mveKarstenK23-May-07 23:01 
GeneralRe: which one is faster and better coding Pin
Mark Focas24-May-07 20:30
Mark Focas24-May-07 20:30 
GeneralRe: which one is faster and better coding Pin
Vasudevan Deepak Kumar24-May-07 23:17
Vasudevan Deepak Kumar24-May-07 23:17 
GeneralRe: which one is faster and better coding Pin
John R. Shaw25-May-07 16:08
John R. Shaw25-May-07 16:08 
QuestionCould this copy/paste redundancy prove costly? Pin
jayart17-May-07 0:58
jayart17-May-07 0:58 
Recently a contractor(my View about Contractors - are supposed to good programmers!) worked in our project.
Code written in C#-VS2005
He wrote
<br />
public void RegisterEvents()<br />
{<br />
	obj.CenterChanged += new CenterChangedEventHandler(OnCenterChanged);<br />
	obj.CenterChanged += new CenterChangedEventHandler(OnCenterChanged);<br />
	/// few more handlers<br />
}<br />


My question:
Would registering the same event twice call the handler twice when event is raised?

-rt
AnswerRe: Could this copy/paste redundancy prove costly? Pin
jayart17-May-07 1:17
jayart17-May-07 1:17 
AnswerRe: Could this copy/paste redundancy prove costly? Pin
Pete O'Hanlon17-May-07 2:07
mvePete O'Hanlon17-May-07 2:07 
GeneralRe: Could this copy/paste redundancy prove costly? Pin
Vasudevan Deepak Kumar24-May-07 23:21
Vasudevan Deepak Kumar24-May-07 23:21 
AnswerRe: Could this copy/paste redundancy prove costly? Pin
Tim Yen20-May-07 22:09
Tim Yen20-May-07 22:09 
GeneralRe: Could this copy/paste redundancy prove costly? Pin
Vasudevan Deepak Kumar24-May-07 23:20
Vasudevan Deepak Kumar24-May-07 23:20 
AnswerRe: Could this copy/paste redundancy prove costly? Pin
Vasudevan Deepak Kumar24-May-07 23:18
Vasudevan Deepak Kumar24-May-07 23:18 
GeneralIf, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
Vikram A Punathambekar15-May-07 22:31
Vikram A Punathambekar15-May-07 22:31 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
szukuro15-May-07 22:37
szukuro15-May-07 22:37 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
Vikram A Punathambekar16-May-07 1:18
Vikram A Punathambekar16-May-07 1:18 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
szukuro16-May-07 1:31
szukuro16-May-07 1:31 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
Vikram A Punathambekar16-May-07 2:41
Vikram A Punathambekar16-May-07 2:41 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
Stick^20-May-07 18:02
Stick^20-May-07 18:02 
JokeRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
CPallini16-May-07 1:32
mveCPallini16-May-07 1:32 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
Vikram A Punathambekar16-May-07 1:21
Vikram A Punathambekar16-May-07 1:21 
General[modified] Re: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
CPallini16-May-07 1:34
mveCPallini16-May-07 1:34 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
DavidNohejl15-May-07 23:47
DavidNohejl15-May-07 23:47 
GeneralRe: If, for some weird reason, you _have_ to use Hungarian in .NET, at least use it properly Pin
Vasudevan Deepak Kumar16-May-07 0:16
Vasudevan Deepak Kumar16-May-07 0:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.