I have a class that has an interface in it like so:

```
 public class hcmTerminal {

    ... Code

    public interface onDataReceived {
        void isCompleted(bool done);
    }

}

```

inside this class I I have the public property:

```
public onDataReceived mDataReceived;

```

then I have a function to set the delegate:

```
public void setDataReceived(onDataReceived dataReceived) { mDataReceived = dataReceived; }

```

Inside the hcmTerminal class I am am calling the delegate : 

```
mDataReceived.isCompleted(true);

```

But I can't figure out the syntax to actually get when that delegate gets called, In java I can go:

```
myTerminal.setDataReceived(new hcmTerminal.onDataReceived(){

    @Override
    public void isCompleted(boolean done){

        ... Code

    }

});

```

But if I try that in C# I get:

> 
> Cannot create an instance of the abstract or interface
>  'hcmTerminal.onDataReceived'
> 
> 
> 

I haven't had to create a interface in C# before. this code is coming from how I implemented it in Java.