我有 1 个这样的“car_brands”枚举声明:
public enum Car_brands
{
    Audi = 1,
    ...
    ...
}
和许多其他这样的每个“car_brand”的枚举声明
public enum Audi
{
    model_a3 = 1,
    model_a4 = 2,
    ...
}
我有 2 个关联的组合框。与 car_brands 相关的一个:
 comboBox1.DataSource = new BindingSource(Car_brands.Keys, null);
我想要另一个组合框填充选择品牌的枚举(例如奥迪的奥迪枚举模型)。
我试试这个,但它似乎不准确......
private void comboBox3_SelectedValueChanged(object sender, EventArgs e)
        {
string value = comboBox1.Text;   //car brand
Type type = Type.GetType(value);
var brand_models = Enum.GetNames(type.GetType());
                foreach (string enumValue in brand_models)
                    {
                        string brand_model = enumValue;
                        MessageBox.Show(brand_model);
                    }
        }