aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers/FieldSet.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ProtocolBuffers/FieldSet.cs')
-rw-r--r--src/ProtocolBuffers/FieldSet.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ProtocolBuffers/FieldSet.cs b/src/ProtocolBuffers/FieldSet.cs
index 39b2a696..f084afa2 100644
--- a/src/ProtocolBuffers/FieldSet.cs
+++ b/src/ProtocolBuffers/FieldSet.cs
@@ -62,8 +62,8 @@ namespace Google.ProtocolBuffers {
}
public static FieldSet CreateInstance() {
- // Use SortedList to keep fields in the canonical order
- return new FieldSet(new SortedList<FieldDescriptor, object>());
+ // Use SortedDictionary to keep fields in the canonical order
+ return new FieldSet(new SortedDictionary<FieldDescriptor, object>());
}
/// <summary>
@@ -82,7 +82,7 @@ namespace Google.ProtocolBuffers {
}
if (hasRepeats) {
- var tmp = new SortedList<FieldDescriptor, object>();
+ var tmp = new SortedDictionary<FieldDescriptor, object>();
foreach (KeyValuePair<FieldDescriptor, object> entry in fields) {
IList<object> list = entry.Value as IList<object>;
tmp[entry.Key] = list == null ? entry.Value : Lists.AsReadOnly(list);