Makian
Makian
CC#
Created by Makian on 9/4/2023 in #help
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
6 replies