Click here to Skip to main content
15,922,512 members
Home / Discussions / C#
   

C#

 
QuestionRe: Where to keep the public variables & Functions? VS2010 Pin
#realJSOP9-May-11 8:18
professional#realJSOP9-May-11 8:18 
AnswerRe: Where to keep the public variables & Functions? VS2010 Pin
PIEBALDconsult9-May-11 14:40
mvePIEBALDconsult9-May-11 14:40 
AnswerRe: Where to keep the public variables & Functions? VS2010 Pin
Luc Pattyn9-May-11 2:49
sitebuilderLuc Pattyn9-May-11 2:49 
GeneralRe: Where to keep the public variables & Functions? VS2010 Pin
PIEBALDconsult9-May-11 3:13
mvePIEBALDconsult9-May-11 3:13 
AnswerRe: Where to keep the public variables & Functions? VS2010 Pin
#realJSOP9-May-11 8:15
professional#realJSOP9-May-11 8:15 
GeneralRe: Where to keep the public variables & Functions? VS2010 Pin
SilimSayo9-May-11 11:38
SilimSayo9-May-11 11:38 
GeneralRe: Where to keep the public variables & Functions? VS2010 Pin
PIEBALDconsult9-May-11 14:14
mvePIEBALDconsult9-May-11 14:14 
GeneralRe: Where to keep the public variables & Functions? VS2010 Pin
SilimSayo11-May-11 6:30
SilimSayo11-May-11 6:30 
GeneralRe: Where to keep the public variables & Functions? VS2010 Pin
PIEBALDconsult11-May-11 14:31
mvePIEBALDconsult11-May-11 14:31 
AnswerRe: Where to keep the public variables & Functions? VS2010 Pin
Shameel9-May-11 18:10
professionalShameel9-May-11 18:10 
GeneralRe: Where to keep the public variables & Functions? VS2010 Pin
Paramu197310-May-11 0:12
Paramu197310-May-11 0:12 
QuestionSpace in a c# wordAddIn project Pin
Pierre besquent9-May-11 0:43
Pierre besquent9-May-11 0:43 
Questionkdtele disconnect problem Pin
mobasher8-May-11 23:22
mobasher8-May-11 23:22 
AnswerRe: kdtele disconnect problem Pin
Dave Kreskowiak9-May-11 1:23
mveDave Kreskowiak9-May-11 1:23 
Questionc# application hang plz help Pin
spider_vikas8-May-11 20:57
spider_vikas8-May-11 20:57 
AnswerRe: c# application hang plz help Pin
Łukasz Nowakowski8-May-11 21:41
Łukasz Nowakowski8-May-11 21:41 
GeneralWhich kind of connects can be captured by Win32_ServerConnection!! [modified] Pin
Member 46594858-May-11 17:39
Member 46594858-May-11 17:39 
AnswerRe: Unable to get connected users by Win32_ServerConnection!! Pin
OriginalGriff8-May-11 20:31
mveOriginalGriff8-May-11 20:31 
GeneralRe: Unable to get connected users by Win32_ServerConnection!! Pin
Member 46594858-May-11 21:08
Member 46594858-May-11 21:08 
AnswerRe: Unable to get connected users by Win32_ServerConnection!! Pin
OriginalGriff8-May-11 21:18
mveOriginalGriff8-May-11 21:18 
GeneralRe: Unable to get connected users by Win32_ServerConnection!! Pin
Member 46594858-May-11 21:22
Member 46594858-May-11 21:22 
AnswerRe: Unable to get connected users by Win32_ServerConnection!! Pin
OriginalGriff8-May-11 21:29
mveOriginalGriff8-May-11 21:29 
GeneralRe: Unable to get connected users by Win32_ServerConnection!! Pin
OriginalGriff8-May-11 21:20
mveOriginalGriff8-May-11 21:20 
GeneralRe: Unable to get connected users by Win32_ServerConnection!! Pin
Member 46594858-May-11 21:25
Member 46594858-May-11 21:25 
QuestionGeneric linked list Pin
frofrofrofro7-May-11 5:56
frofrofrofro7-May-11 5:56 
Hello there.

I'm learning generics and linked list.
now i have managed to make a generic linked list, but I don't know how I can get the needed data out of it.
I can do it without generics, but with generics I don't know how, I can't find it.


So here I add people and show all the added people.
LinkedList<Persoon> LlPersoon = LinkedList<Persoon>.GetInstance();
            LlPerson.Add(new Persoon(1, "First Person"));
            LlPerson.Add(new Persoon(2, "Second Person"));
            LlPerson.Add(new Persoon(3, "third person"));
            Console.WriteLine(LlPerson);
            Console.WriteLine("  Done. Adding Persons...");


but how can I just show the second person?
Without generics I did the following thing to get the name of person 2
public string getName(int iPersonNr)
        {
            Person Per = FirstPer;
            bool bln = false;
            string strName = "N/A"; // if there isn't a person with iPersonNr i return "N/A"

            while (Per != null && !bln)
            {
                if (iPersonNr == Per.getNumber())
                {
                    strName = Per.getName();
                    bln=true;
                }
                Per = Per.getVolgende();
            }

            return strName;
        }



I tried for days, but can't find it.
It must be something simple but I have no clue as I don't master generics enough.
any directions or help would be appreciated
thx
frofro

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.