Click here to Skip to main content
15,921,990 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to install a document in the Users My Documents folder Pin
Tad McClellan8-Oct-06 6:42
professionalTad McClellan8-Oct-06 6:42 
GeneralRe: How to install a document in the Users My Documents folder Pin
Nader Elshehabi8-Oct-06 6:52
Nader Elshehabi8-Oct-06 6:52 
GeneralRe: How to install a document in the Users My Documents folder Pin
Tad McClellan8-Oct-06 7:00
professionalTad McClellan8-Oct-06 7:00 
QuestionGetting user name and user password of user logged in windows. Pin
dhriaj8-Oct-06 2:34
dhriaj8-Oct-06 2:34 
AnswerRe: Getting user name and user password of user logged in windows. Pin
Tad McClellan8-Oct-06 3:37
professionalTad McClellan8-Oct-06 3:37 
GeneralRe: Getting user name and user password of user logged in windows. Pin
Anthony Mushrow8-Oct-06 12:00
professionalAnthony Mushrow8-Oct-06 12:00 
Questionhow to kill a thread gracfully Pin
Parshant Verma8-Oct-06 1:37
Parshant Verma8-Oct-06 1:37 
AnswerRe: how to kill a thread gracfully [modified] Pin
Guffa8-Oct-06 2:13
Guffa8-Oct-06 2:13 
The most graceful way is to tell the thread to stop on it's own.

If the thread is running an instance method of a class, you could change a proeprty in the class to flag that it's time to stop.

Otherwise there is a special exception (don't recall what it's called right now) that you can raise in the thead, that you can initiate from outside the thread and catch inside the thread. That gives the thread a chance to clean up whatever it needs before turning in.

-- modified at 9:11 Sunday 8th October, 2006

I was just reading about Monitors, and stumbled upon the Exception that is used to interrupt a thread. The exception is ThreadInterruptedException, and is created with the Interrupt method of the Thread class.


---
b { font-weight: normal; }

AnswerRe: how to kill a thread gracfully Pin
User 66588-Oct-06 2:18
User 66588-Oct-06 2:18 
QuestionCombobox problems Pin
Glen Harvy8-Oct-06 0:08
Glen Harvy8-Oct-06 0:08 
AnswerRe: Combobox problems Pin
Christian Graus8-Oct-06 0:25
protectorChristian Graus8-Oct-06 0:25 
GeneralRe: Combobox problems Pin
Glen Harvy8-Oct-06 0:47
Glen Harvy8-Oct-06 0:47 
GeneralRe: Combobox problems Pin
Christian Graus8-Oct-06 0:57
protectorChristian Graus8-Oct-06 0:57 
GeneralRe: Combobox problems Pin
Glen Harvy8-Oct-06 1:26
Glen Harvy8-Oct-06 1:26 
GeneralRe: Combobox problems Pin
Christian Graus8-Oct-06 8:29
protectorChristian Graus8-Oct-06 8:29 
GeneralRe: Combobox problems Pin
Glen Harvy8-Oct-06 17:57
Glen Harvy8-Oct-06 17:57 
GeneralRe: Combobox problems Pin
Christian Graus8-Oct-06 18:06
protectorChristian Graus8-Oct-06 18:06 
AnswerRe: Combobox problems Pin
Ratheous13-Oct-06 1:50
Ratheous13-Oct-06 1:50 
QuestionFirewall Pin
Hareesh.P.R8-Oct-06 0:00
Hareesh.P.R8-Oct-06 0:00 
AnswerRe: Firewall Pin
Niiiissssshhhhhuuuuu8-Oct-06 17:55
Niiiissssshhhhhuuuuu8-Oct-06 17:55 
Questionhow can i add checkbox to datagrid Pin
ashraf hakiem7-Oct-06 23:19
ashraf hakiem7-Oct-06 23:19 
AnswerRe: how can i add checkbox to datagrid Pin
Nader Elshehabi8-Oct-06 6:28
Nader Elshehabi8-Oct-06 6:28 
Questionpublic static property question Pin
uglyeyes7-Oct-06 20:55
uglyeyes7-Oct-06 20:55 
AnswerRe: public static property question Pin
NaNg152417-Oct-06 21:00
NaNg152417-Oct-06 21:00 
AnswerRe: public static property question Pin
Guffa7-Oct-06 21:12
Guffa7-Oct-06 21:12 

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.