C
C#11mo ago
Makian

Interfaces

Having issues with properly implementing interface property
public interface Item {
public int durability { get; protected set; }
public int maxDurability { get; protected set; }
}
public interface Item {
public int durability { get; protected set; }
public int maxDurability { get; protected set; }
}
public class Magazine : Item {
public int durability { get => 1; protected set { } }
public int maxDurability { get => 1; protected set { } }
}
public class Magazine : Item {
public int durability { get => 1; protected set { } }
public int maxDurability { get => 1; protected set { } }
}
Errors: 'Magazine' does not implement interface member 'Item.durability.set'. 'Magazine.durability.set' is not public 'Magazine' does not implement interface member 'Item.maxDurability.set'. 'Magazine.maxDurability.set' is not public
1 Reply
Makian
Makian11mo ago
sadge private work? alr thanks man i'll close the post