title: Need to get the SQL Server "PRINT" value in C#
body: <p>I have a <strong>SP</strong> that Prints the results into <strong>SQL Server</strong>, but I need to use that value in <strong>C#</strong>.</p>
  
  <p>Changing the <code>PRINT</code> to <code>SELECT</code> is not an option right now. I tried to <code>SqlCommand.ExecuteScalar()</code> but that didn't work. </p>
  
  <p>Does anybody know if it is possible to get the value of <code>PRINT</code> command in <strong>SP</strong> redirected to <strong>C#</strong>?</p>
  
  <p><strong>EXAMPLE:</strong> </p>
  
  <pre><code>CREATE PROCEDURE doXYZ
  AS
  BEGIN
     PRINT 'XYZ'
  END
  </code></pre>
  
  <p>Now in <strong>C#</strong> I need to get the value 'XYZ'.... any ideas?</p>