79656901

Date: 2025-06-07 11:54:00
Score: 1.5
Natty:
Report link

Found answer:

First initialize them on form load, or creation, or whatever:

iconFull = (Icon)Properties.Resources.tray_full.Clone();  
iconEmpty = (Icon)Properties.Resources.tray_empty.Clone();

And then

notifyIcon.Icon = info.ItemCount == 0 ? iconEmpty : iconFull;
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Mr.Weegley