We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55d4438 commit 17b2f90Copy full SHA for 17b2f90
docs/standard/serialization/system-text-json/snippets/how-to/csharp/DictionaryTKeyEnumTValueConverter.cs
@@ -25,8 +25,9 @@ public override JsonConverter CreateConverter(
25
Type type,
26
JsonSerializerOptions options)
27
{
28
- Type keyType = type.GetGenericArguments()[0];
29
- Type valueType = type.GetGenericArguments()[1];
+ Type[] typeArguments = type.GetGenericArguments();
+ Type keyType = typeArguments[0];
30
+ Type valueType = typeArguments[1];
31
32
JsonConverter converter = (JsonConverter)Activator.CreateInstance(
33
typeof(DictionaryEnumConverterInner<,>).MakeGenericType(
0 commit comments