Click here to Skip to main content
15,904,503 members
Home / Discussions / C#
   

C#

 
GeneralRe: Making data grid show vertically rather than horizontally Pin
MeisterBiber24-Aug-03 9:57
MeisterBiber24-Aug-03 9:57 
Generalinheritance with a twist on IEditableObject Pin
Ista23-Aug-03 18:53
Ista23-Aug-03 18:53 
GeneralDeveloping a voice messenger with .NET Pin
Naveed Ahmad23-Aug-03 17:52
Naveed Ahmad23-Aug-03 17:52 
GeneralATL server Pin
devvvy23-Aug-03 16:42
devvvy23-Aug-03 16:42 
GeneralRe: ATL server Pin
Ista23-Aug-03 18:50
Ista23-Aug-03 18:50 
GeneralRe: ATL server Pin
devvvy23-Aug-03 20:28
devvvy23-Aug-03 20:28 
GeneralRe: ATL server Pin
Ista23-Aug-03 18:56
Ista23-Aug-03 18:56 
GeneralRe: ATL server Pin
Ista23-Aug-03 19:09
Ista23-Aug-03 19:09 
GeneralRe: ATL server Pin
devvvy23-Aug-03 20:44
devvvy23-Aug-03 20:44 
GeneralRe: ATL server Pin
Ista24-Aug-03 5:16
Ista24-Aug-03 5:16 
GeneralRe: ATL server Pin
Ista24-Aug-03 6:45
Ista24-Aug-03 6:45 
Generaltransforming bitmaps Pin
Ista23-Aug-03 15:38
Ista23-Aug-03 15:38 
GeneralGod book on patterns in C# Pin
ervar23-Aug-03 12:45
ervar23-Aug-03 12:45 
GeneralRe: God book on patterns in C# Pin
MeisterBiber23-Aug-03 13:26
MeisterBiber23-Aug-03 13:26 
GeneralRe: God book on patterns in C# Pin
flipdoubt23-Aug-03 14:52
flipdoubt23-Aug-03 14:52 
GeneralRe: God book on patterns in C# Pin
ervar24-Aug-03 20:38
ervar24-Aug-03 20:38 
GeneralRe: God book on patterns in C# Pin
Jim Stewart26-Aug-03 10:20
Jim Stewart26-Aug-03 10:20 
GeneralCuting out a part of a bitmap Pin
Ylis23-Aug-03 11:45
Ylis23-Aug-03 11:45 
GeneralRe: Cuting out a part of a bitmap Pin
J. Dunlap23-Aug-03 13:47
J. Dunlap23-Aug-03 13:47 
GeneralRe: Cuting out a part of a bitmap Pin
Ista23-Aug-03 19:17
Ista23-Aug-03 19:17 
GeneralRe: Cuting out a part of a bitmap Pin
Ylis24-Aug-03 6:12
Ylis24-Aug-03 6:12 
GeneralEFFICIENCY: lock{} or .Synchronized Pin
MeisterBiber23-Aug-03 11:45
MeisterBiber23-Aug-03 11:45 
GeneralRe: EFFICIENCY: lock{} or .Synchronized Pin
Julian Bucknall [MSFT]25-Aug-03 10:15
Julian Bucknall [MSFT]25-Aug-03 10:15 
Andi

There's no difference performance-wise. (Synchronized uses the lock keyword itself.) Sop it boils down to whether you need to specify the actual intent in your code. With

lock(MyArrayList) {
  MyArrayList.This();
  MyArrayList.That();
  MyArrayList.TheOther();
}

you are explicitly stating that, yes, this is threadsafe. Look, there's the lock keyword. With

MyArrayList.This();
MyArrayList.That();
MyArrayList.TheOther();

you are saying, trust me, I've set up MyArrayList to be a Synchronized version of another ArrayList, so this is threadsafe. Maybe the code that sets up the Synchronized version is nearby, so it's obvious (say in a using block).

Of course, if you forget to set up MyArrayList in that way, you've got a bug.



Cheers, Julian
Program Manager, C#

This posting is provided "AS IS" with no warranties, and confers no rights.
General80% call doA() , 20% call doB() Pin
MeisterBiber23-Aug-03 7:01
MeisterBiber23-Aug-03 7:01 
GeneralRe: 80% call doA() , 20% call doB() Pin
Daniel Turini23-Aug-03 12:10
Daniel Turini23-Aug-03 12:10 

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.