title: VB.net: Suppress Error Message Problem
body: <p>I have read the <a href="http://msdn.microsoft.com/en-us/library/ms182069(v=VS.90).aspx#1" rel="nofollow noreferrer">MSDN Page</a> on how to suppress messages. I am unable to supress 
  warnings for VS2008.</p>
  
  <p>I have tried the following instructions listed:</p>
  
  <blockquote>
    <ol>
    <li><p>In the Error List, select the
    warning or warnings to suppress.
    Multiple warnings can be selected at
    the same time. </p></li>
    <li><p>Right-click the warning, point to
    Suppress Message(s), and click
    either In Source or In Project
    Suppression File. </p></li>
    <li><p>The specific warning is suppressed,
    and the warning appears in the Error
    List window with a strikethrough.</p></li>
    </ol>
  </blockquote>
  
  <p>However, when I right click in the <strong>'Error List'</strong> I only get the following options:</p>
  
  <blockquote>
    <ul>
    <li>Sort By</li>
    <li>Show Columns</li>
    <li>Show Error Help</li>
    <li>Copy</li>
    <li>Previous Error</li>
    <li>Next Error</li>
    </ul>
  </blockquote>
  
  <p>Why does Visual Studios 2008 for VB.net not display <strong>'Suppress Messages'</strong>?</p>
  
  <p>I cannot generate the following suppressing messages:</p>
  
  <pre><code>&lt;Scope:SuppressMessage("Rule Category", "Rule Id", "Justification", "MessageId", Scope = "Scope", Target = "Target")&gt;
  </code></pre>
  
  <p>The problem was I had a series of parallel tasks that were dependent on check boxes. I wanted each task to to run simultaneously and then join back. I overcame the warning by using a callback method that decremented until all the call backs completed.</p>
  
  <p>ie (from memory):</p>
  
  <pre><code>chkbox1.enable = false
  chkbox2.enable = false
  dim dlgChkbox1 as Action = addressof Task1
  dim dlgChkbox2 as Action = addressof Task2
  ...
  if chkbox1.checked = true then
     result = dlgChkbox1.BeginInvoke(nothing,nothing)
  end if
  if chkbox2.checked = true then
     result = dlgChkbox2.BeginInvoke(nothing,nothing)
  end if
  ...
  if chkbox1.checked = true then
      dlgChkbox1.EndInvoke()
  end if
  if chkbox1.checked = true then
      dlgChkbox2.EndInvoke()
  end if
  ...
  chkBox1.enable = true
  chkBox2.enable = true
  </code></pre>
  
  <p>The warning was an Uninitialized Variable. Which was not the case as it was dependent on identical if-statements. I opted to use a callback method instead, which turned out to be a better alternative and did not lock up the GUI.</p>