Which of the Following Statement is true in the below given code?
public interface ISkillGunCalc
void Add(int x, int y);
void Sub(int x, int y);
public struct SkillGunCalc : ISkillGunCalc
public void Add(int x, int y)
int z = x + y;
Need to declare struct as abstract.
Can not implement interfaces in structs.
Declare void Sub(int,int) as abstract in struct S.
We should give implementation to all the methods which are present in ISkillGunCalc otherwise
we will get compilation error.
If all the methods of interface not implemented in a class which is implementing the interface we can make that class as abstract, but a struct cannot be declared as abstract.
Back To Top