Skip to content

Commit bf63abf

Browse files
Update NullableBoolConverter.cs (#8388)
* Update NullableBoolConverter.cs * Update src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/NullableBoolConverter.cs Co-authored-by: ThomasGoulet73 <[email protected]> --------- Co-authored-by: ThomasGoulet73 <[email protected]>
1 parent 289e9a9 commit bf63abf

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/NullableBoolConverter.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,10 @@ public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
5757
/// <returns>TypeConverter.StandardValuesCollection</returns>
5858
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
5959
{
60-
if (_standardValues == null)
60+
return _standardValues ??= new TypeConverter.StandardValuesCollection(new Nullable<bool>[]
6161
{
62-
ArrayList list1 = new ArrayList(3);
63-
list1.Add((bool?)true);
64-
list1.Add((bool?)false);
65-
list1.Add((bool?)null);
66-
_standardValues = new TypeConverter.StandardValuesCollection(list1.ToArray());
67-
}
68-
return _standardValues;
62+
true, false, null
63+
});
6964
}
7065

7166
/// <summary>

0 commit comments

Comments
 (0)