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

C#

 
GeneralRe: Adding dll to the workspace Pin
Md Saleem Navalur31-Dec-04 21:29
Md Saleem Navalur31-Dec-04 21:29 
GeneralRe: Adding dll to the workspace Pin
Heath Stewart31-Dec-04 22:49
protectorHeath Stewart31-Dec-04 22:49 
Questionhow to lock a method in class Pin
ting66830-Dec-04 22:11
ting66830-Dec-04 22:11 
AnswerRe: how to lock a method in class Pin
Robert Rohde30-Dec-04 22:19
Robert Rohde30-Dec-04 22:19 
AnswerRe: how to lock a method in class Pin
Heath Stewart31-Dec-04 6:26
protectorHeath Stewart31-Dec-04 6:26 
GeneralRe: how to lock a method in class Pin
ting6682-Jan-05 15:13
ting6682-Jan-05 15:13 
GeneralRe: how to lock a method in class Pin
Heath Stewart2-Jan-05 21:18
protectorHeath Stewart2-Jan-05 21:18 
GeneralRe: how to lock a method in class Pin
ting6683-Jan-05 14:49
ting6683-Jan-05 14:49 
Hi Health,

Class class1
{
public void MethodA()
{

lock (this)
{
MethodB();
}

}

public void MethodB()
{
lock (this)
{
...
}
}

}

From the code above, statements in locking block of MethodB still successfully run which is branched within the lock from MethodA. Why it is not a counter example of the locking theroy of the point1 :

Then using the same reference of a instance of class1, after calling MethodA and MethodA not yet finished executing within the lock, MethodB still can be called unless lock(this) is also used in MethodB?

of the last reply?

Thanks
GeneralRe: how to lock a method in class Pin
Heath Stewart3-Jan-05 18:47
protectorHeath Stewart3-Jan-05 18:47 
QuestionIs this kind of encapsulation right for the event and delegate? Pin
Salil Khedkar30-Dec-04 20:00
Salil Khedkar30-Dec-04 20:00 
AnswerRe: Is this kind of encapsulation right for the event and delegate? Pin
Heath Stewart30-Dec-04 20:29
protectorHeath Stewart30-Dec-04 20:29 
GeneralRe: Is this kind of encapsulation right for the event and delegate? Pin
Salil Khedkar2-Jan-05 21:26
Salil Khedkar2-Jan-05 21:26 
Generalload values into the dataset form the xml Pin
dhol30-Dec-04 19:11
dhol30-Dec-04 19:11 
GeneralProgrammetically Selection of Language Pin
SoloVision30-Dec-04 18:22
SoloVision30-Dec-04 18:22 
GeneralRe: Programmetically Selection of Language Pin
Heath Stewart30-Dec-04 20:14
protectorHeath Stewart30-Dec-04 20:14 
Generalprogramticly scroll a richtextbox Pin
Tyrus18230-Dec-04 14:46
Tyrus18230-Dec-04 14:46 
GeneralRe: programticly scroll a richtextbox Pin
Heath Stewart30-Dec-04 20:06
protectorHeath Stewart30-Dec-04 20:06 
Generalusing non true type or open type fonts Pin
Tyrus18230-Dec-04 14:43
Tyrus18230-Dec-04 14:43 
Questionwhat is wrong here ? Pin
kings_130-Dec-04 11:38
kings_130-Dec-04 11:38 
AnswerRe: what is wrong here ? Pin
Heath Stewart30-Dec-04 12:06
protectorHeath Stewart30-Dec-04 12:06 
GeneralRe: what is wrong here ? Pin
kings_130-Dec-04 19:46
kings_130-Dec-04 19:46 
GeneralRe: what is wrong here ? Pin
Heath Stewart30-Dec-04 20:01
protectorHeath Stewart30-Dec-04 20:01 
GeneralRe: what is wrong here ? Pin
kings_131-Dec-04 0:59
kings_131-Dec-04 0:59 
GeneralRe: what is wrong here ? Pin
Heath Stewart31-Dec-04 6:10
protectorHeath Stewart31-Dec-04 6:10 
GeneralRe: what is wrong here ? Pin
kings_131-Dec-04 7:15
kings_131-Dec-04 7:15 

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.