0

I have used static functions in my interface class.

If I don't put definition in interface,

 public interface CPT
 {
    public static void authenticate(CPTIntegrationUser user);
 }

it gives error as Method must declare a body because it is not marked abstract, extern, or partial

and if I declare a body,

public interface CPT
{
  public static void authenticate(CPTIntegrationUser user) {}
}

it gives error as Error CS8701: Target runtime doesn't support default interface implementation. (CS8701)

Nidhi
  • 754
  • 5
  • 9

0 Answers0