C
C#15mo 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
MakianOP15mo ago
sadge private work? alr thanks man i'll close the post
Want results from more Discord servers?
Add your server