Click here to Skip to main content
15,888,579 members
Home / Discussions / C#
   

C#

 
AnswerRe: Fishing for Ideas (C# file copy) Pin
Eddy Vluggen3-Apr-09 4:07
professionalEddy Vluggen3-Apr-09 4:07 
GeneralRe: Fishing for Ideas (C# file copy) Pin
compninja253-Apr-09 5:49
compninja253-Apr-09 5:49 
GeneralRe: Fishing for Ideas (C# file copy) Pin
Eddy Vluggen3-Apr-09 7:47
professionalEddy Vluggen3-Apr-09 7:47 
QuestionC# Networking: Handling Clients? Pin
Abydosgater3-Apr-09 3:10
Abydosgater3-Apr-09 3:10 
AnswerRe: C# Networking: Handling Clients? Pin
Skymir3-Apr-09 7:59
Skymir3-Apr-09 7:59 
QuestionDoes Click Once download files not modified? Pin
l.m.k3-Apr-09 2:45
l.m.k3-Apr-09 2:45 
AnswerRe: Does Click Once download files not modified? Pin
Henry Minute3-Apr-09 3:33
Henry Minute3-Apr-09 3:33 
QuestionMulti-Threading Pin
linto_113-Apr-09 2:44
linto_113-Apr-09 2:44 
The code shown below is with which im messed up............
The problem is 'thread1' and 'thread2' are working simultaneously but the output is not in the correct format. Please check this out and please help with proper solution. I want both load_1() and load_2() to be shown properly. it is very urgent. Waiting for your reply!!!



using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;

namespace Loading
{
class loading
{
public static void load_1()
{
Console.SetCursorPosition(0, 2);
for (int l = 1; l <= 50; l++)
{
Console.Write("\\\b");
Thread.Sleep(50);
Console.Write("|\b");
Thread.Sleep(50);
Console.Write("/ \b");
Thread.Sleep(50);
Console.Write("\b");
Console.Write("|");
}
}

public static void load_2()
{
for (int load = 0; load <= 100; load++)
{
Thread.Sleep(10);
Console.SetCursorPosition(25, 4);
Console.Write("{0}%", load);
}
}

static void Main(string[] args)
{
Console.SetCursorPosition(16, 4);
Console.Write("LOADING:");
Thread thread1 = new Thread(new ThreadStart(load_1));
Thread thread2 = new Thread(new ThreadStart(load_2));
thread1.Start();
thread2.Start();
thread1.Join();
thread2.Join();
}
}
}

LINTO
Answerverrrry urgent Pin
Luc Pattyn3-Apr-09 2:52
sitebuilderLuc Pattyn3-Apr-09 2:52 
GeneralRe: verrrry urgent Pin
linto_113-Apr-09 2:57
linto_113-Apr-09 2:57 
GeneralRe: verrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrry urgent Pin
musefan3-Apr-09 3:03
musefan3-Apr-09 3:03 
GeneralRe: verrrry urgent Pin
musefan3-Apr-09 3:01
musefan3-Apr-09 3:01 
AnswerRe: Multi-Threading Pin
compninja253-Apr-09 3:03
compninja253-Apr-09 3:03 
GeneralRe: Multi-Threading Pin
linto_113-Apr-09 3:21
linto_113-Apr-09 3:21 
GeneralRe: Multi-Threading Pin
compninja253-Apr-09 6:08
compninja253-Apr-09 6:08 
AnswerRe: Multi-Threading Pin
King Julien3-Apr-09 3:15
King Julien3-Apr-09 3:15 
QuestionMuti threading Pin
linto_113-Apr-09 2:20
linto_113-Apr-09 2:20 
AnswerRe: Muti threading Pin
Le centriste3-Apr-09 2:25
Le centriste3-Apr-09 2:25 
AnswerRe: Muti threading Pin
King Julien3-Apr-09 2:26
King Julien3-Apr-09 2:26 
AnswerRe: Muti threading Pin
musefan3-Apr-09 3:08
musefan3-Apr-09 3:08 
AnswerRe: Muti threading Pin
#realJSOP3-Apr-09 4:49
mve#realJSOP3-Apr-09 4:49 
AnswerRe: Muti threading Pin
J4amieC3-Apr-09 5:59
J4amieC3-Apr-09 5:59 
GeneralRe: Muti threading Pin
Luc Pattyn3-Apr-09 6:56
sitebuilderLuc Pattyn3-Apr-09 6:56 
QuestionCalling code from Win32 dll Pin
_AnsHUMAN_ 3-Apr-09 2:12
_AnsHUMAN_ 3-Apr-09 2:12 
AnswerRe: Calling code from Win32 dll Pin
Giorgi Dalakishvili3-Apr-09 2:14
mentorGiorgi Dalakishvili3-Apr-09 2:14 

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.