Click to See Complete Forum and Search --> : [MethodImpl(MethodImplOptions.Synchronized)]


hansipet
August 3rd, 2006, 05:27 AM
Hello,

I have a question regarding to the
[MethodImpl(MethodImplOptions.Synchronized)]
statement.

I have read now a few explanation what this statement does, but the strange is that some authors write about a synchronization of this method only (the method can be called only once but other methods can be called during that) and other writes that every method with this attribute is synchronized.

What is now right?

Regards
Hansjörg

MadHatter
August 3rd, 2006, 09:39 AM
it causes a lock(this) to be implemented for the body of the method.