Click here to Skip to main content
15,913,055 members
Home / Discussions / C#
   

C#

 
AnswerRe: How To programming Client/Server database ? Pin
Michael P Butler27-Nov-06 10:34
Michael P Butler27-Nov-06 10:34 
AnswerRe: How To programming Client/Server database ? Pin
ednrgc28-Nov-06 2:37
ednrgc28-Nov-06 2:37 
Questionhow to use Sql Server 2005 Reporting Services ? Pin
hdv21227-Nov-06 8:35
hdv21227-Nov-06 8:35 
AnswerRe: how to use Sql Server 2005 Reporting Services ? Pin
Michael P Butler27-Nov-06 10:29
Michael P Butler27-Nov-06 10:29 
Questionwhat is happen Pin
amirafouad2127-Nov-06 8:21
amirafouad2127-Nov-06 8:21 
AnswerRe: what is happen Pin
Nader Elshehabi27-Nov-06 8:37
Nader Elshehabi27-Nov-06 8:37 
GeneralRe: what is happen Pin
amirafouad2127-Nov-06 9:59
amirafouad2127-Nov-06 9:59 
AnswerRe: what is happen Pin
Nader Elshehabi27-Nov-06 11:53
Nader Elshehabi27-Nov-06 11:53 
First of all; You are always welcome.

Now to your issue:
The summary of your problem is that you want to implement a linked list data structure in C#. Right? Whatever is stored in that linked list -in my following example I will make a sample lawyer object to demonstrate linked lists in C#-, you don't need to use pointer. Yes you can use pointers in C#, but you absolutely don't need them.

I'd like to remind you that objects -ie. instances of classes- are reference type. That means -assuming you made a class named lawyer-:
Lawyer A = new Lawyer();
Lawyer B = A;

Here A, and B are the same lawyer. If you change anything in A it will also change in B and vice versa. So to implement linked lists in C# -using references to objects instead of pointers-, here is a samll sample:
namespace MyNameSpace
{
    class Lawyer
    {
        public string Name;
        public string Address;
        public string Telephone;

        //The reference to the next Lawyer in list
        public Lawyer Previous;
        public Lawyer()
        {
        }
    }
}

You can now use your Linked list as a stack -First In Last Out-, or a queue -by adding another reference to the Next item-. I believe you made some reading in Data structure and you can get going from here. Here is a small sample of using the above very simple linked list:

Lawyer LastItem = new Lawyer();
for(int I = 0; I <10; I++)
{
    Lawyer another = new Lawyer();
    another.Previous = LastItem; //You add a reference to it not the object itself
    LastItem = another;//Now we change reference of the LastItem to be the most recently added item
}

If you still need clarification about anything, just post.

RegardsRose | [Rose]

GeneralRe: what is happen [modified] Pin
amirafouad2128-Nov-06 5:35
amirafouad2128-Nov-06 5:35 
GeneralRe: what is happen Pin
Nader Elshehabi28-Nov-06 8:20
Nader Elshehabi28-Nov-06 8:20 
QuestionDatagrid parent children rows??? Pin
Small Rat27-Nov-06 6:21
Small Rat27-Nov-06 6:21 
AnswerRe: Datagrid parent children rows??? Pin
Not Active27-Nov-06 7:40
mentorNot Active27-Nov-06 7:40 
Questionoverload,override,abstract Pin
saravanan0527-Nov-06 5:42
saravanan0527-Nov-06 5:42 
AnswerRe: overload,override,abstract Pin
J4amieC27-Nov-06 5:57
J4amieC27-Nov-06 5:57 
GeneralRe: overload,override,abstract Pin
Eric Dahlvang27-Nov-06 7:22
Eric Dahlvang27-Nov-06 7:22 
GeneralRe: overload,override,abstract Pin
J4amieC28-Nov-06 0:33
J4amieC28-Nov-06 0:33 
AnswerRe: overload,override,abstract Pin
karam chandrabose27-Nov-06 9:20
karam chandrabose27-Nov-06 9:20 
QuestionHow to detect DataGridView Order Change ? Pin
Marcos Hernandez27-Nov-06 5:40
Marcos Hernandez27-Nov-06 5:40 
AnswerRe: How to detect DataGridView Order Change ? Pin
ednrgc28-Nov-06 2:52
ednrgc28-Nov-06 2:52 
GeneralRe: How to detect DataGridView Order Change ? Pin
Marcos Hernandez28-Nov-06 4:00
Marcos Hernandez28-Nov-06 4:00 
GeneralRe: How to detect DataGridView Order Change ? Pin
ednrgc28-Nov-06 4:02
ednrgc28-Nov-06 4:02 
GeneralRe: How to detect DataGridView Order Change ? Pin
Marcos Hernandez28-Nov-06 4:11
Marcos Hernandez28-Nov-06 4:11 
GeneralRe: How to detect DataGridView Order Change ? Pin
ednrgc28-Nov-06 4:12
ednrgc28-Nov-06 4:12 
GeneralRe: How to detect DataGridView Order Change ? Pin
Marcos Hernandez28-Nov-06 4:29
Marcos Hernandez28-Nov-06 4:29 
GeneralRe: How to detect DataGridView Order Change ? Pin
ednrgc28-Nov-06 4:35
ednrgc28-Nov-06 4:35 

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.