Click here to Skip to main content
14,922,948 members
Home / Discussions / C#
   

C#

 
GeneralRe: Unlimited List Pin
User 66589-Jul-08 7:55
MemberUser 66589-Jul-08 7:55 
GeneralRe: Unlimited List Pin
Saksida Bojan9-Jul-08 8:16
MemberSaksida Bojan9-Jul-08 8:16 
GeneralRe: Unlimited List Pin
User 66589-Jul-08 8:53
MemberUser 66589-Jul-08 8:53 
GeneralRe: Unlimited List Pin
Christian Graus9-Jul-08 8:13
protectorChristian Graus9-Jul-08 8:13 
GeneralRe: Unlimited List Pin
Saksida Bojan9-Jul-08 8:18
MemberSaksida Bojan9-Jul-08 8:18 
GeneralRe: Unlimited List Pin
Christian Graus9-Jul-08 8:40
protectorChristian Graus9-Jul-08 8:40 
GeneralRe: Unlimited List Pin
Saksida Bojan9-Jul-08 8:56
MemberSaksida Bojan9-Jul-08 8:56 
GeneralRe: Unlimited List Pin
#realJSOP9-Jul-08 9:12
mva#realJSOP9-Jul-08 9:12 
First, learn how to post code snippets here.

Second, this code:

static void Main(string[] args)
{
    List<processinfo> lpi = new List<processinfo>();

    do
    {
        ProcessInfo pi = new ProcessInfo();
        lpi.Add(pi);
    } while (true);
}</processinfo></processinfo>


Should look more like this:

static void Main(string[] args)
{
    List<processinfo> listOfProcesses = new List<processinfo>();

    while (true()
    {
        ProcessInfo processInfo = new ProcessInfo();
        if (processInfo != null)
        {
            listOfProcesses.Add(processInfo);
        }
        else
        {
            break;
        }
    }
}</processinfo></processinfo>


1) You had an endless loop.

2) Your variable names suck.


"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


GeneralRe: Unlimited List Pin
Saksida Bojan9-Jul-08 9:21
MemberSaksida Bojan9-Jul-08 9:21 
GeneralRe: Unlimited List Pin
Dave Kreskowiak9-Jul-08 10:15
mveDave Kreskowiak9-Jul-08 10:15 
GeneralRe: Unlimited List Pin
Saksida Bojan10-Jul-08 8:31
MemberSaksida Bojan10-Jul-08 8:31 
GeneralRe: Unlimited List Pin
leppie9-Jul-08 21:05
Memberleppie9-Jul-08 21:05 
GeneralRe: Unlimited List Pin
#realJSOP9-Jul-08 23:19
mva#realJSOP9-Jul-08 23:19 
QuestionTrying to Print a file from C# code...NEWBIE Pin
zachbob9-Jul-08 7:35
Memberzachbob9-Jul-08 7:35 
AnswerRe: Trying to Print a file from C# code...NEWBIE Pin
Christian Graus9-Jul-08 7:40
protectorChristian Graus9-Jul-08 7:40 
GeneralRe: Trying to Print a file from C# code...NEWBIE Pin
zachbob9-Jul-08 7:42
Memberzachbob9-Jul-08 7:42 
GeneralRe: Trying to Print a file from C# code...NEWBIE Pin
Luc Pattyn9-Jul-08 8:00
sitebuilderLuc Pattyn9-Jul-08 8:00 
GeneralRe: Trying to Print a file from C# code...NEWBIE Pin
zachbob9-Jul-08 8:46
Memberzachbob9-Jul-08 8:46 
GeneralRe: Trying to Print a file from C# code...NEWBIE Pin
Luc Pattyn9-Jul-08 9:17
sitebuilderLuc Pattyn9-Jul-08 9:17 
GeneralRe: Trying to Print a file from C# code...NEWBIE Pin
zachbob9-Jul-08 9:36
Memberzachbob9-Jul-08 9:36 
GeneralRe: Trying to Print a file from C# code...NEWBIE Pin
Luc Pattyn9-Jul-08 9:50
sitebuilderLuc Pattyn9-Jul-08 9:50 
GeneralRe: Trying to Print a file from C# code...NEWBIE Pin
zachbob10-Jul-08 3:06
Memberzachbob10-Jul-08 3:06 
GeneralRe: Trying to Print a file from C# code...NEWBIE Pin
Luc Pattyn10-Jul-08 3:19
sitebuilderLuc Pattyn10-Jul-08 3:19 
GeneralRe: Trying to Print a file from C# code...NEWBIE Pin
Luc Pattyn14-Jul-08 0:53
sitebuilderLuc Pattyn14-Jul-08 0:53 
QuestionFinding COM-port information Pin
Tummelisa9-Jul-08 7:27
MemberTummelisa9-Jul-08 7:27 

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.