Click here to Skip to main content
12,697,178 members (25,122 online)

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.

 
GeneralRe: Pass by value and pass by reference Pin
CPallini20-Jul-08 4:56
mvpCPallini20-Jul-08 4:56 
GeneralRe: Pass by value and pass by reference Pin
Joe Woodbury19-Jul-08 10:07
memberJoe Woodbury19-Jul-08 10:07 
GeneralRe: Pass by value and pass by reference Pin
KarstenK21-Jul-08 3:42
memberKarstenK21-Jul-08 3:42 
AnswerRe: Pass by value and pass by reference Pin
Mitendra Anand21-Jul-08 21:58
memberMitendra Anand21-Jul-08 21:58 
Value-type objects such as structs are created on the stack, while reference-type objects such as classes are created on the heap.

So it is actually a PASS - BY - REFERENCE

Both types of objects are destroyed automatically, but objects based on value types are destroyed when they go out of scope, whereas objects based on reference types are destroyed at an unspecified time after the last reference to them is removed.

Happy Coding!
Mitendra
GeneralRe: Pass by value and pass by reference Pin
jon_17523-Jul-08 13:00
memberjon_17523-Jul-08 13:00 
GeneralRe: Pass by value and pass by reference Pin
Mitendra Anand23-Jul-08 22:01
memberMitendra Anand23-Jul-08 22:01 
GeneralPadding an ID to six digits Pin
ClementsDan14-Jul-08 16:57
memberClementsDan14-Jul-08 16:57 
GeneralRe: Padding an ID to six digits Pin
_Damian S_14-Jul-08 18:01
member_Damian S_14-Jul-08 18:01 
GeneralRe: Padding an ID to six digits Pin
PIEBALDconsult15-Jul-08 5:31
memberPIEBALDconsult15-Jul-08 5:31 
GeneralRe: Padding an ID to six digits Pin
Stephen Hewitt14-Jul-08 18:53
mvpStephen Hewitt14-Jul-08 18:53 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 21 Jan 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid