using System;
using System.IO;

namespace Sasa.QualityTools.DrFx.Tests.Violation.CSharp.Microsoft.Design
{
   public  class Rule1031
    {
       private Stream stream = new MemoryStream();

       // このメソッドは CA1031 に違反しています。
       public string ReadData()
       {
           try
           {
               using (StreamReader reader = new StreamReader(this.stream))
               {
                   return reader.ReadToEnd();
               }
           }
           catch (Exception)
           {
               Console.WriteLine("failed to read.");
           }
           return null;
       }
    }
}
