Click here to Skip to main content
15,914,419 members
Home / Discussions / C#
   

C#

 
GeneralRe: output confusion Pin
Luc Pattyn5-Jun-10 3:31
sitebuilderLuc Pattyn5-Jun-10 3:31 
GeneralRe: output confusion Pin
Estys5-Jun-10 3:11
Estys5-Jun-10 3:11 
QuestionControl: Get value from a Form Pin
MBGustavo4-Jun-10 20:01
MBGustavo4-Jun-10 20:01 
AnswerRe: Control: Get value from a Form Pin
#realJSOP5-Jun-10 2:03
professional#realJSOP5-Jun-10 2:03 
GeneralRe: Control: Get value from a Form Pin
MBGustavo5-Jun-10 4:45
MBGustavo5-Jun-10 4:45 
QuestionIphone programming(Please Help) Pin
future38394-Jun-10 13:57
future38394-Jun-10 13:57 
AnswerRe: Iphone programming(Please Help) PinPopular
Luc Pattyn4-Jun-10 14:37
sitebuilderLuc Pattyn4-Jun-10 14:37 
GeneralRe: Iphone programming(Please Help) Pin
Not Active5-Jun-10 2:54
mentorNot Active5-Jun-10 2:54 
GeneralRe: Iphone programming(Please Help) Pin
Luc Pattyn5-Jun-10 3:11
sitebuilderLuc Pattyn5-Jun-10 3:11 
QuestionHow can I remotely explore my LAN? Remoting? Pin
Member 18349914-Jun-10 6:57
Member 18349914-Jun-10 6:57 
AnswerRe: How can I remotely explore my LAN? Remoting? Pin
Not Active4-Jun-10 7:06
mentorNot Active4-Jun-10 7:06 
AnswerRe: How can I remotely explore my LAN? Remoting? Pin
#realJSOP4-Jun-10 7:31
professional#realJSOP4-Jun-10 7:31 
AnswerRe: How can I remotely explore my LAN? Remoting? Pin
Member 18349914-Jun-10 8:52
Member 18349914-Jun-10 8:52 
GeneralRe: How can I remotely explore my LAN? Remoting? Pin
#realJSOP5-Jun-10 1:56
professional#realJSOP5-Jun-10 1:56 
Questionproblem in Class Pin
SajjadZare4-Jun-10 6:15
SajjadZare4-Jun-10 6:15 
AnswerRe: problem in Class Pin
Abhinav S4-Jun-10 6:18
Abhinav S4-Jun-10 6:18 
GeneralRe: problem in Class Pin
SajjadZare4-Jun-10 6:51
SajjadZare4-Jun-10 6:51 
GeneralRe: problem in Class Pin
Luc Pattyn4-Jun-10 8:37
sitebuilderLuc Pattyn4-Jun-10 8:37 
SajjadZare wrote:
I want to see 10 here


only people unfamiliar to object orientation would expect or accept that to happen.

you have two statements containing new class1() which means two objects get created, i.e. two different instantiations of the class1 class. Now if one object is changed, that should not reflect on its siblings. If your house has ten windows and you happen to break one of them, you would not like all of them to break into pieces, would you?

There are a couple of ways to get what you want. They all have one thing in common: they create only one instance of the thing that needs to be accessed at several locations, instead they pass a reference around. And there is a plethora of articles on the subject, maybe this one[^] can help you.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read formatted code with indentation, so please use PRE tags for code snippets.

I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).

GeneralRe: problem in Class Pin
OriginalGriff4-Jun-10 8:50
mveOriginalGriff4-Jun-10 8:50 
GeneralRe: problem in Class Pin
Luc Pattyn4-Jun-10 9:30
sitebuilderLuc Pattyn4-Jun-10 9:30 
GeneralRe: problem in Class Pin
OriginalGriff4-Jun-10 9:41
mveOriginalGriff4-Jun-10 9:41 
GeneralRe: problem in Class [modified] Pin
Luc Pattyn4-Jun-10 9:49
sitebuilderLuc Pattyn4-Jun-10 9:49 
GeneralRe: problem in Class Pin
OriginalGriff4-Jun-10 11:53
mveOriginalGriff4-Jun-10 11:53 
GeneralRe: problem in Class Pin
Luc Pattyn4-Jun-10 11:57
sitebuilderLuc Pattyn4-Jun-10 11:57 
AnswerRe: problem in Class Pin
Not Active4-Jun-10 6:57
mentorNot Active4-Jun-10 6:57 

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.