| Numéro d’ID de bogue |
BUG-000112996 |
| Envoi | April 5, 2018 |
| Dernière modification | June 5, 2024 |
| S’applique à | ArcGIS Runtime SDK |
| Version trouvée | 100.2.0 |
| Système d’exploitation | Windows OS |
| Version du système d’exploitation | 10.0 64 Bit |
| Statut | Will Not Be Addressed
L’équipe de développement a examiné le problème ou la demande et a décidé qu’ils ne seraient pas traités. Pour d’autres explications, reportez-vous à la section Informations supplémentaires correspondant au problème.
|
Informations supplémentaires
The current behavior is by-design: the order of keys in a dictionary is not guaranteed in .NET.
For more information see https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2?view=netframework-4.7.1#remarks
"For purposes of enumeration, each item in the dictionary is treated as a KeyValuePair structure representing a value and its key. The order in which the items are returned is undefined."
Instead, if the data should be presented to the user in a specific order, then the field attribute values should be requested by Key. For example the BUG reproducer code can be modified:
```
foreach (var geoelement in result.GeoElements)
{
foreach (var field in ((FeatureLayer)result.LayerContent).FeatureTable.Fields)
{
Debug.WriteLine(string.Format("{0}: ",field.Name) + geoelement.Attributes[field.Name]?.ToString());
}
}
```
Étapes pour reproduire
ID de bogue: BUG-000112996
Logiciel: