[Solved] Unknown piece of code, what’s it called? [closed]


The first line looks like an interface declaration. It is saying that a class has a method that accepts an integer and a string and returns an integer.

Then it calls the method. However, this isn’t valid right now. I’m not sure if the rest was removed for brevity since you didn’t link to the source. Valid code would look like this:

public interface ISomeInterface
{
    int test(int a, string b);       
}

ISomeInterface instance = GetInstance();

int i = instance.test(1, "b");

8

solved Unknown piece of code, what’s it called? [closed]