Click here to Skip to main content
15,891,184 members
Home / Discussions / C#
   

C#

 
GeneralRe: showing a panel on a dialog Pin
NikoTanghe9-Nov-05 21:11
NikoTanghe9-Nov-05 21:11 
QuestionIterating thru the Outlook mail folders - C# Pin
vjvivaj9-Nov-05 3:21
vjvivaj9-Nov-05 3:21 
AnswerRe: Iterating thru the Outlook mail folders - C# Pin
Judah Gabriel Himango9-Nov-05 5:24
sponsorJudah Gabriel Himango9-Nov-05 5:24 
GeneralRe: Iterating thru the Outlook mail folders - C# Pin
vjvivaj9-Nov-05 18:15
vjvivaj9-Nov-05 18:15 
Questionhelp with Deserialize a string problem in c# Pin
drey19-Nov-05 3:20
drey19-Nov-05 3:20 
AnswerRe: help with Deserialize a string problem in c# Pin
Jon Rista9-Nov-05 10:39
Jon Rista9-Nov-05 10:39 
NewsC# lock statement Pin
Den2Fly9-Nov-05 3:00
Den2Fly9-Nov-05 3:00 
AnswerRe: C# lock statement Pin
Judah Gabriel Himango9-Nov-05 5:20
sponsorJudah Gabriel Himango9-Nov-05 5:20 
Actually, it's recommended you never use lock(this) [that is, locking the class instance] or lock(typeof(TestConsole)) [that is, locking the class type itself). It is highly recommended that if you do use locks, then you should lock private variables in your class, rather than class instance or the class type. The reason is that by using private variables to do locking, you have knowledge of and can control everyone that holds locks on your object. This would not necessarily be true for locking a class instance or the class itself.

Also, as an FYI, the C# lock statement is just syntax candy:

lock(_lockObj)
{
   Console.WriteLine("hello!");
}


will get compiled down to:

System.Threading.Monitor.Enter(_lockObj);
try
{
    Console.WriteLine("hello");
}
finally
{
    System.Threading.Monitor.Exit(_lockObj);
}


Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Morality Apart from God
Judah Himango



-- modified at 11:20 Wednesday 9th November, 2005

GeneralRe: C# lock statement Pin
Jon Rista9-Nov-05 10:54
Jon Rista9-Nov-05 10:54 
NewsRe: C# lock statement Pin
Den2Fly9-Nov-05 13:45
Den2Fly9-Nov-05 13:45 
QuestionFTP Pin
v.k.s9-Nov-05 2:48
v.k.s9-Nov-05 2:48 
AnswerRe: FTP Pin
lmoelleb9-Nov-05 20:57
lmoelleb9-Nov-05 20:57 
QuestionC# control licence question Pin
dojdoj9-Nov-05 2:47
dojdoj9-Nov-05 2:47 
Questionhow to manipulate exe files ? Pin
hdv2129-Nov-05 2:09
hdv2129-Nov-05 2:09 
AnswerRe: how to manipulate exe files ? Pin
User 66589-Nov-05 3:48
User 66589-Nov-05 3:48 
QuestionC# and IUnknown (COM) Pin
MLS9-Nov-05 1:22
MLS9-Nov-05 1:22 
QuestionRecursive function to return the max key of nodes of a singly connected list? Pin
ektoras9-Nov-05 0:35
ektoras9-Nov-05 0:35 
QuestionRecursive function to display the number of nodes of a singly connected list? Pin
ektoras9-Nov-05 0:31
ektoras9-Nov-05 0:31 
AnswerRe: Recursive function to display the number of nodes of a singly connected list? Pin
J4amieC9-Nov-05 2:16
J4amieC9-Nov-05 2:16 
GeneralRe: Recursive function to display the number of nodes of a singly connected list? Pin
ektoras9-Nov-05 3:36
ektoras9-Nov-05 3:36 
GeneralRe: Recursive function to display the number of nodes of a singly connected list? Pin
Wjousts9-Nov-05 4:18
Wjousts9-Nov-05 4:18 
GeneralRe: Recursive function to display the number of nodes of a singly connected list? Pin
ektoras9-Nov-05 7:20
ektoras9-Nov-05 7:20 
GeneralRe: Recursive function to display the number of nodes of a singly connected list? Pin
Wjousts9-Nov-05 7:35
Wjousts9-Nov-05 7:35 
GeneralRe: Recursive function to display the number of nodes of a singly connected list? Pin
J4amieC9-Nov-05 4:45
J4amieC9-Nov-05 4:45 
GeneralRe: Recursive function to display the number of nodes of a singly connected list? Pin
ektoras9-Nov-05 7:38
ektoras9-Nov-05 7:38 

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.