Click here to Skip to main content
15,921,295 members
Home / Discussions / C#
   

C#

 
GeneralRe: Pointer in C# Pin
HosamAly25-Nov-08 23:58
HosamAly25-Nov-08 23:58 
GeneralRe: Pointer in C# Pin
Thomas Weller26-Nov-08 0:12
Thomas Weller26-Nov-08 0:12 
GeneralRe: Pointer in C# Pin
HosamAly26-Nov-08 0:29
HosamAly26-Nov-08 0:29 
GeneralRe: Pointer in C# Pin
N a v a n e e t h26-Nov-08 0:48
N a v a n e e t h26-Nov-08 0:48 
AnswerRe: Pointer in C# Pin
Simon P Stevens25-Nov-08 22:54
Simon P Stevens25-Nov-08 22:54 
GeneralRe: Pointer in C# Pin
Hamed Musavi25-Nov-08 23:13
Hamed Musavi25-Nov-08 23:13 
AnswerRe: Pointer in C# Pin
Shyam Bharath26-Nov-08 0:31
Shyam Bharath26-Nov-08 0:31 
GeneralRe: Pointer in C# Pin
Hamed Musavi26-Nov-08 0:46
Hamed Musavi26-Nov-08 0:46 
I know pass by reference. The problem was to hold the reference and change it's value later on. It looks like as I thought it's only possible by wrapping a struct type inside a class and sending reference to that class and using it to access the struct inside or sending a reference to current class that this struct is a member of which is another way of saying same statement.

From kind help of others I conclude it this way: To store for later access to a state of another class, we need to have that class.

If I was using my brain before asking the question, it was obvious. C# keeps track of references to objects. If someone uses internal data of an object without accessing a reference to that object how can garbage collector find out that it has to keep an object alive even if no one has any reference to that object. No reference = removing it and now a reference to a type inside an object that does not exists is what we ended up. That maybe why we must use class to access it's members. Also as stated earlier it's absolutely a bad design.


Thanks for the help anyway.

"In the end it's a little boy expressing himself."    Yanni


AnswerRe: Pointer in C# Pin
Alan Balkany26-Nov-08 4:15
Alan Balkany26-Nov-08 4:15 
Questionhelp... backup directory... any idea/class? Pin
leeoze25-Nov-08 21:41
leeoze25-Nov-08 21:41 
AnswerRe: help... backup directory... any idea/class? Pin
Christian Graus25-Nov-08 22:23
protectorChristian Graus25-Nov-08 22:23 
AnswerRe: help... backup directory... any idea/class? Pin
Christian Graus25-Nov-08 22:48
protectorChristian Graus25-Nov-08 22:48 
AnswerRe: help... backup directory... any idea/class? Pin
Simon P Stevens25-Nov-08 23:03
Simon P Stevens25-Nov-08 23:03 
AnswerRe: help... backup directory... any idea/class? Pin
Alan Balkany26-Nov-08 4:24
Alan Balkany26-Nov-08 4:24 
GeneralRe: help... backup directory... any idea/class? Pin
leeoze26-Nov-08 20:11
leeoze26-Nov-08 20:11 
QuestionPlease I really need your help Pin
Tiunay25-Nov-08 21:32
Tiunay25-Nov-08 21:32 
AnswerRe: Please I really need your help Pin
Thomas Weller25-Nov-08 21:42
Thomas Weller25-Nov-08 21:42 
GeneralRe: Please I really need your help [modified] Pin
Tiunay25-Nov-08 22:17
Tiunay25-Nov-08 22:17 
AnswerRe: Please I really need your help Pin
Christian Graus25-Nov-08 22:16
protectorChristian Graus25-Nov-08 22:16 
GeneralRe: Please I really need your help Pin
Tiunay25-Nov-08 22:21
Tiunay25-Nov-08 22:21 
QuestionDisplay different ToolTip message in different parts of the same DataGridView control Pin
Desmond Lim25-Nov-08 21:15
Desmond Lim25-Nov-08 21:15 
Questionadd-in using c# Pin
Maverickcool25-Nov-08 21:02
Maverickcool25-Nov-08 21:02 
QuestionBarCode Report Pin
md_refay25-Nov-08 20:31
md_refay25-Nov-08 20:31 
AnswerRe: BarCode Report Pin
Christian Graus25-Nov-08 20:59
protectorChristian Graus25-Nov-08 20:59 
GeneralRe: BarCode Report Pin
md_refay25-Nov-08 21:08
md_refay25-Nov-08 21:08 

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.