So sortieren Sie ResourceSet in C #
Ich habe eine Ressourcendatei mit dem Namen filetypes.resx. Wie ich herausgefunden habe, um die Ressourcenwerte an die Dropdown-Liste zu binden, weiß ich nicht, wie ich die Werte sortieren sollResourceSet.
Folgendes habe ich bisher getan:
FileTypes.resx
Name, WertA, 1
B, 2
C, 3
Code zum Binden der Dropdown-Liste
DropDownList1.DataSource = Resources.FileTypes.ResourceManager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, true, true);
DropDownList1.DataTextField = "Key";
DropDownList1.DataValueField = "Value";
DropDownList1.DataBind();
Ergebnis
A C B
As you can see the result is not sorted. Please help me to solve this issue.
Vielen Dank im Voraus :)