I have defined two properties, "Name" and "ID", for an object which I use for the DisplayMember and ValueMember of a ComboBox with a BindingList datasource.

I recently installed ReSharper to evaluate it. ReSharper is giving me warnings on the object that the two properties are unused.

Sample code:

BindingList<ClassSample> SampleList = new BindingList<ClassSample>();
// populate SampleList
cmbSampleSelector.DisplayMember = "Name";
cmdSampleSelector.ValueMember = "ID";
cmbSampleSelector.DataSource = SampleList;

private class ClassSample
{
    private string _name;
    private string _id;

    public string Name // ReSharper believes this property is unused
    {
        get { return _name; }
    }

    public string ID // ReSharper believes this property is unused
    {
        get {return _id; }
    }

    public ClassSample(string Name, string ID)
    {
        _name = Name;
        _id = ID;
    }
}

Am I doing something wrong or is ReSharper clueless about this particular usage?

Edit
Report