Resharper wanted me to change this code:
foreach (var item in cmbxColor1.Items)
{
cmbxColor2.Items.Add(item);
. . .
...because it said, "Possible 'System.NullReferencesException'"
So it should be this:
foreach (var item in cmbxColor1.Items)
{
if (null != cmbxColor2.Items)
{
cmbxColor2.Items.Add(item);
. . .
?
I don't get this - how could a combobox's Items be null, unless null == empty? And if null == empty, then that's exactly what they [s,w]ould be when this code is called.