RCS1216: Unnecessary unsafe context
Properties
Property | Value |
---|---|
Default Severity | Info |
Minimum language version | - |
Examples
Example #1
diagnostic.cs
public unsafe class Foo
{
public Foo()
{
unsafe
{
Bar();
}
}
private unsafe void Bar()
{
}
}
fix.cs
public class Foo
{
public Foo()
{
Bar();
}
private void Bar()
{
}
}