title: vb.net to c# - how do we correct this error
body: <p>Looking for some vb to c# translation help.</p>
  <p>The immediate line below  in is causing an error in C# (&quot;argument 1 must be passed with the 'ref' keyword&quot;) - adding a 'ref&quot; before <code>nextbutton.visible</code> causes yet another error (&quot;A property or indexer may not be passed as an out or ref parameter&quot;). <strong>Any suggestions is appreciated</strong>.</p>
  <pre><code>nextButton.Enabled = InlineAssignHelper(nextButton.Visible, false);
  
  private static T InlineAssignHelper&lt;T&gt;(ref T target, T value)
  {
       target = value;
       return value;
  }
  </code></pre>
  <p>Here is the VB.net code we are trying to convert used with no errors:</p>
  <pre><code>nextButton.Enabled = InlineAssignHelper(nextButton.Visible, False)
  
  Private Shared Function InlineAssignHelper(Of T)(ByRef target As T, ByVal value As T) As T
      target = value
      Return value
  End Function
  </code></pre>