To add to other answers, here is a table which shows possible reorderings on different architectures:
(credit: Linux Journal, Memory Ordering in Modern Microprocessors by Paul E. McKenney)
Regarding Intel architectures and the OP's question, it shows that:
stores cannot be reordered with other stores on x86 (this includes IA-32 and Intel64, or Intel's implementation with x86-64, not to be confused with IA-64/Itanium),
but stores can be reordered with other stores on IA-64 (Itanium) processors.
On the other hand, according to this link, .NET (since 2.0) should ensure that out-of-order writes never happen (even on such architectures):
On .NET (...) this kind of code motion and processor reordering is not legal. This specific example was a primary motivation for the strengthening changes we made to the .NET Framework 2.0’s implemented memory model in the CLR. Writes always retire in-order. To forbid out-of-order writes, the CLR’s JIT compiler emits the proper instructions on appropriate architectures (i.e. in this case, ensuring all writes on IA64 are store/release).
This MSDN article also explains it:
Strong Model 2: .NET Framework 2.0
The rules for this model (introduced in .NET 2.0) are:
- All the rules that are contained in the ECMA model, in particular the three fundamental memory model rules as well as the ECMA rules for volatile.
- Reads and writes cannot be introduced.
- A read can only be removed if it is adjacent to another read to the same location from the same thread. A write can only be removed if it is adjacent to another write to the same location from the same thread. Rule 5 can be used to make reads or writes adjacent before applying this rule.
- Writes cannot move past other writes from the same thread.
- Reads can only move earlier in time, but never past a write to the same memory location from the same thread.
Given the fact that Microsoft recently dropped support for Itanium in both Windows Server and Visual Studio, you can basically only target x86/x64 from now on, which have stricter memory models mentioned above, disallowing out-of-order writes.
Of course, since there exist different implementations of Microsoft's .NET (Mono), claims like these should be taken with reserve.