I want to inherit the DevExpress ComboBoxEdit control, and am wondering if naming my class the same as the DevExpress class is bad practice.
Here's the derived class declaration:
using System;
using System.Collections.Generic;
using System.Text;
namespace MyApplication.Components
{
public class ComboBoxEdit : DevExpress.XtraEditors.ComboBoxEdit
{
}
}
Should I rename MyApplication.Components.ComboBoxEdit to something else like MyComboBoxEdit?
I too would advise against a naming collision. With respect to the name, if you have a reason to create an inherited control, then you should be able to give a useful name.
The My prefix is severely limiting and has little value to newcomers reading the code. You also risk running into MyComboBox2 when you need a new one.
Well, it's legal to do it, but I would advise against it because it would only cause confusion... Why not name it "MyComboBoxEdit" or "SuperComboBoxEdit" or anything you like ?