Click here to Skip to main content
15,914,642 members
Home / Discussions / C#
   

C#

 
AnswerRe: LINQ to SQL - Design Pattern Pin
T M Gray14-Sep-10 8:43
T M Gray14-Sep-10 8:43 
AnswerRe: LINQ to SQL - Design Pattern Pin
PIEBALDconsult14-Sep-10 15:12
mvePIEBALDconsult14-Sep-10 15:12 
QuestionSimple Animation... Pin
stephen.darling14-Sep-10 7:01
stephen.darling14-Sep-10 7:01 
AnswerRe: Simple Animation... Pin
Ennis Ray Lynch, Jr.14-Sep-10 7:07
Ennis Ray Lynch, Jr.14-Sep-10 7:07 
AnswerRe: Simple Animation... Pin
Luc Pattyn14-Sep-10 7:08
sitebuilderLuc Pattyn14-Sep-10 7:08 
GeneralRe: Simple Animation... Pin
stephen.darling14-Sep-10 9:50
stephen.darling14-Sep-10 9:50 
GeneralRe: Simple Animation... Pin
Luc Pattyn14-Sep-10 9:53
sitebuilderLuc Pattyn14-Sep-10 9:53 
QuestionStatic method and thread safe question Pin
Yanshof14-Sep-10 6:17
Yanshof14-Sep-10 6:17 
I have some static method that i call from the main code.
The method return some object that i allocate in the start of the method - and in the method body i doing some operation on this object and at the end i return it.

Its look like this:

static object locker = new object();
public static SomeObject f(SomeObject org)
{
     SomeObject o

     lock( locker )
     {
          o = org.Clone();    
          Do something on o;
     }

     return o;
}


I dont know why - but i get the "exception Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

If i lock the scop - how other thread got in ?

Someone can help here ?
AnswerRe: Static method and thread safe question Pin
Luc Pattyn14-Sep-10 6:20
sitebuilderLuc Pattyn14-Sep-10 6:20 
AnswerRe: Static method and thread safe question Pin
Ennis Ray Lynch, Jr.14-Sep-10 7:01
Ennis Ray Lynch, Jr.14-Sep-10 7:01 
Questionusercontrol Pin
utunity14-Sep-10 5:01
utunity14-Sep-10 5:01 
AnswerRe: usercontrol Pin
Luc Pattyn14-Sep-10 5:45
sitebuilderLuc Pattyn14-Sep-10 5:45 
GeneralRe: usercontrol Pin
Henry Minute14-Sep-10 5:46
Henry Minute14-Sep-10 5:46 
AnswerRe: usercontrol Pin
Henry Minute14-Sep-10 5:45
Henry Minute14-Sep-10 5:45 
GeneralRe: usercontrol Pin
utunity14-Sep-10 6:02
utunity14-Sep-10 6:02 
GeneralRe: usercontrol Pin
Henry Minute14-Sep-10 6:14
Henry Minute14-Sep-10 6:14 
GeneralRe: usercontrol Pin
Luc Pattyn14-Sep-10 6:18
sitebuilderLuc Pattyn14-Sep-10 6:18 
GeneralRe: usercontrol Pin
utunity14-Sep-10 6:36
utunity14-Sep-10 6:36 
GeneralRe: usercontrol Pin
Luc Pattyn14-Sep-10 6:57
sitebuilderLuc Pattyn14-Sep-10 6:57 
GeneralRe: usercontrol Pin
utunity14-Sep-10 7:10
utunity14-Sep-10 7:10 
GeneralRe: usercontrol Pin
Luc Pattyn14-Sep-10 7:39
sitebuilderLuc Pattyn14-Sep-10 7:39 
GeneralRe: usercontrol Pin
utunity14-Sep-10 7:50
utunity14-Sep-10 7:50 
GeneralRe: usercontrol Pin
Henry Minute14-Sep-10 6:59
Henry Minute14-Sep-10 6:59 
GeneralRe: usercontrol Pin
Luc Pattyn14-Sep-10 6:17
sitebuilderLuc Pattyn14-Sep-10 6:17 
GeneralRe: usercontrol Pin
utunity14-Sep-10 10:50
utunity14-Sep-10 10:50 

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.