roslynator
roslynator copied to clipboard
Improve analyzer "Use exception filter" (RCS1236)
trafficstars
This
try
{
return Load(path);
}
catch (IOException)
{
}
catch (UnauthorizedAccessException)
{
}
catch (XmlException)
{
}
can be replaced with this
try
{
return Load(path);
}
catch (Exception ex) when (ex is IOException
|| ex is UnauthorizedAccessException
|| ex is XmlException)
{
}