title: How do I use Thread.VolatileWrite with reference types with Option Strict On?
body: <p>Wrapping the argument in CObj or DirectCast shuts the compiler up, but the value is still not written.</p>
  
  <pre><code>Option Strict On
  Imports System.Threading
  Module Module1
      Dim str As String
      Sub Main()
          Thread.VolatileWrite(str, "HELLO") ' Compiler error.
          Thread.VolatileWrite(CObj(str), "HELLO") ' Fails silently.
          Thread.VolatileWrite(DirectCast(str), "HELLO") ' Fails silently.
          Console.WriteLine(str)
      End Sub
  End Module
  </code></pre>