public Battery(BatteryType batteryType, int? hoursIdle = null, int? hoursTalk = null) { this.Model = batteryType.ToString(); this.HoursIdle = hoursIdle; this.HoursTalk = hoursTalk; this.batteryType = batteryType; }
public override string ToString() { string returnmessage = $"Battery type:\t\t {BatteryType.ToString()}\n"; returnmessage += $"Capacity:\t\t {Capacity}\n"; returnmessage += $"Is built-in:\t\t {Builtinb}\n"; returnmessage += $"Is Wireless charged:\t {Wirelesschrgb}\n"; return(returnmessage); }
public override string ToString() { if (BatteryType != null) { return(BatteryType.ToString()); } if (Indicator != null) { return(Indicator.Value.ToString()); } if (PortTypes == null) { return("Invalid"); } if (PortTypes.Length == 0) { return("Empty port plate"); } return("Port plate [" + PortTypes.JoinString(", ") + "]"); }
public override string ToString() { return(BatteryType.ToString() + " " + Model.ToString()); }