shah123

[code]

class node
{ private int data; //holds an arbitrary integer
private node next; //reference to the next node

public node(int d, node n) //constructor
{ data = d;
next = n;
}
//these methods let us use our variables
public void setNext(node n)
{ next=n;}

public void setData(int d)
{ data=d;}

public node getNext()
{ return next;}

public int getData()
{ return data;}
}

[/code]

Hi, I have a query about programming as above is not my code but just want to ask one question please help me in that.

1. When we have to use Class object or when to create class object Is there another way of doing one work without creating class object

2. When we need to use Set and Get Methods and where they will be used mostly

3. When i start programming above idea, it's very hard for me to think like the above person thought

Please help me in answering my queries..

regards,




Re: Visual C# General Class Objects, Set&Get Problems

Ernst Kuschke

This is very basic Object Oriented programming, and looks similar in any OO Language - I suggest you read some introductory books on OO Wink





Re: Visual C# General Class Objects, Set&Get Problems

shah123

Thanks,