Beef icon indicating copy to clipboard operation
Beef copied to clipboard

Is is possible to instantiate a type which implements an interface but does not provide an implementation for abstract methods in the interface

Open jayrulez opened this issue 3 years ago • 0 comments

This should probably be disallowed:

Example:

interface IDevice
{
    abstract void Test();
}

class Device : IDevice
{
}

class Program
{
    public static void CreateDevice(out IDevice device)
    {
        device = new Device();
        device.Test();
    }
}

jayrulez avatar Sep 24 '22 01:09 jayrulez