Click here to Skip to main content
15,881,172 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralMessage Removed Pin
29-Apr-10 5:02
professionalN_tro_P29-Apr-10 5:02 
GeneralRe: lock Pin
Luc Pattyn29-Apr-10 5:07
sitebuilderLuc Pattyn29-Apr-10 5:07 
GeneralMessage Removed Pin
29-Apr-10 5:38
professionalN_tro_P29-Apr-10 5:38 
GeneralRe: lock Pin
Luc Pattyn29-Apr-10 5:48
sitebuilderLuc Pattyn29-Apr-10 5:48 
GeneralMessage Removed Pin
29-Apr-10 5:50
professionalN_tro_P29-Apr-10 5:50 
GeneralRe: lock PinPopular
Luc Pattyn29-Apr-10 5:57
sitebuilderLuc Pattyn29-Apr-10 5:57 
GeneralMessage Removed Pin
29-Apr-10 6:07
professionalN_tro_P29-Apr-10 6:07 
GeneralRe: lock Pin
Covean29-Apr-10 6:23
Covean29-Apr-10 6:23 
Its a good practice because in most cases you have more than one object you have to sync over threads.
Now if you just use, lets say some list, you have to sync. Its possible to sync everything with the reference to the list object. After 5 months of work, your costumer says he needs some extras. Now how many work do you have if this extras not only need to sync this list but also some other variables (in most cases controlled by this list, but not in all) . Do you really want to lock the list every time you need to access some of this variables?

Thats why its an good practice, cause in the scenario above you do not have to change anything in your locking behavior, if you use an extra object.
Greetings
Covean

GeneralRe: lock Pin
Alex Manolescu29-Apr-10 11:34
Alex Manolescu29-Apr-10 11:34 
GeneralRe: lock Pin
Dave Kreskowiak29-Apr-10 7:01
mveDave Kreskowiak29-Apr-10 7:01 
GeneralRe: lock Pin
Covean29-Apr-10 6:13
Covean29-Apr-10 6:13 
GeneralRe: lock Pin
supercat929-Apr-10 9:11
supercat929-Apr-10 9:11 
GeneralRe: lock Pin
Luc Pattyn29-Apr-10 9:38
sitebuilderLuc Pattyn29-Apr-10 9:38 
GeneralRe: lock Pin
supercat929-Apr-10 13:10
supercat929-Apr-10 13:10 
GeneralRe: lock Pin
Luc Pattyn29-Apr-10 13:56
sitebuilderLuc Pattyn29-Apr-10 13:56 
GeneralRe: lock Pin
supercat930-Apr-10 5:02
supercat930-Apr-10 5:02 
GeneralRe: lock Pin
Luc Pattyn30-Apr-10 5:19
sitebuilderLuc Pattyn30-Apr-10 5:19 
GeneralEnumerators Pin
supercat930-Apr-10 6:12
supercat930-Apr-10 6:12 
GeneralRe: Enumerators Pin
Luc Pattyn30-Apr-10 9:18
sitebuilderLuc Pattyn30-Apr-10 9:18 
GeneralRe: Enumerators Pin
supercat930-Apr-10 11:31
supercat930-Apr-10 11:31 
QuestionReference a .NET 3.5 assembly form a .NET 2.0 other assembly: in VS2008 ok, not in VS2010 Pin
Ferdinando Santacroce29-Apr-10 3:22
Ferdinando Santacroce29-Apr-10 3:22 
AnswerRe: Reference a .NET 3.5 assembly form a .NET 2.0 other assembly: in VS2008 ok, not in VS2010 Pin
Not Active29-Apr-10 3:35
mentorNot Active29-Apr-10 3:35 
GeneralRe: Reference a .NET 3.5 assembly form a .NET 2.0 other assembly: in VS2008 ok, not in VS2010 Pin
Luc Pattyn29-Apr-10 4:18
sitebuilderLuc Pattyn29-Apr-10 4:18 
AnswerRe: Reference a .NET 3.5 assembly form a .NET 2.0 other assembly: in VS2008 ok, not in VS2010 Pin
Ferdinando Santacroce29-Apr-10 5:54
Ferdinando Santacroce29-Apr-10 5:54 
QuestionAny Problem with VS 2010 Ultimate? if VS 2008 already exists.. Pin
yadlaprasad29-Apr-10 1:26
yadlaprasad29-Apr-10 1:26 

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.