diff --git a/src/System.Windows.Forms/System/Windows/Forms/Controls/ListBoxes/ListBox.IntegerCollection.cs b/src/System.Windows.Forms/System/Windows/Forms/Controls/ListBoxes/ListBox.IntegerCollection.cs index 421247d5b70..932bc047604 100644 --- a/src/System.Windows.Forms/System/Windows/Forms/Controls/ListBoxes/ListBox.IntegerCollection.cs +++ b/src/System.Windows.Forms/System/Windows/Forms/Controls/ListBoxes/ListBox.IntegerCollection.cs @@ -43,7 +43,7 @@ bool ICollection.IsSynchronized { get { - return true; + return false; } } diff --git a/src/System.Windows.Forms/System/Windows/Forms/Controls/ListBoxes/ListBox.SelectedIndexCollection.cs b/src/System.Windows.Forms/System/Windows/Forms/Controls/ListBoxes/ListBox.SelectedIndexCollection.cs index 31b0100cfba..f8c5aeea6e3 100644 --- a/src/System.Windows.Forms/System/Windows/Forms/Controls/ListBoxes/ListBox.SelectedIndexCollection.cs +++ b/src/System.Windows.Forms/System/Windows/Forms/Controls/ListBoxes/ListBox.SelectedIndexCollection.cs @@ -41,7 +41,7 @@ bool ICollection.IsSynchronized { get { - return true; + return false; } } diff --git a/src/test/unit/System.Windows.Forms/System/Windows/Forms/ListBox.IntegerCollectionTests.cs b/src/test/unit/System.Windows.Forms/System/Windows/Forms/ListBox.IntegerCollectionTests.cs index 6912f58e31f..b9e110f0fca 100644 --- a/src/test/unit/System.Windows.Forms/System/Windows/Forms/ListBox.IntegerCollectionTests.cs +++ b/src/test/unit/System.Windows.Forms/System/Windows/Forms/ListBox.IntegerCollectionTests.cs @@ -30,7 +30,7 @@ public void ListBoxIntegerCollection_ICollection_Properties_GetReturnsExpected() using ListBox owner = new(); ICollection collection = new ListBox.IntegerCollection(owner); Assert.Empty(collection); - Assert.True(collection.IsSynchronized); + Assert.False(collection.IsSynchronized); Assert.Same(collection, collection.SyncRoot); } @@ -42,7 +42,7 @@ public void ListBoxIntegerCollection_IList_Properties_GetReturnsExpected() Assert.Empty(collection); Assert.False(collection.IsFixedSize); Assert.False(collection.IsReadOnly); - Assert.True(collection.IsSynchronized); + Assert.False(collection.IsSynchronized); Assert.Same(collection, collection.SyncRoot); } diff --git a/src/test/unit/System.Windows.Forms/System/Windows/Forms/ListBox.SelectedIndexCollectionTests.cs b/src/test/unit/System.Windows.Forms/System/Windows/Forms/ListBox.SelectedIndexCollectionTests.cs index e589d76f7f3..1cb76f08f53 100644 --- a/src/test/unit/System.Windows.Forms/System/Windows/Forms/ListBox.SelectedIndexCollectionTests.cs +++ b/src/test/unit/System.Windows.Forms/System/Windows/Forms/ListBox.SelectedIndexCollectionTests.cs @@ -29,7 +29,7 @@ public void ListBoxSelectedIndexCollection_ICollection_Properties_GetReturnsExpe using ListBox owner = new(); ICollection collection = new ListBox.SelectedIndexCollection(owner); Assert.Empty(collection); - Assert.True(collection.IsSynchronized); + Assert.False(collection.IsSynchronized); Assert.Same(collection, collection.SyncRoot); } @@ -41,7 +41,7 @@ public void ListBoxSelectedIndexCollection_IList_Properties_GetReturnsExpected() Assert.Empty(collection); Assert.True(collection.IsFixedSize); Assert.True(collection.IsReadOnly); - Assert.True(collection.IsSynchronized); + Assert.False(collection.IsSynchronized); Assert.Same(collection, collection.SyncRoot); }