Przeglądaj źródła

Use the Count-property on a list instead of enumerating it with Count(). (#596)

Daniel C. Weber 7 lat temu
rodzic
commit
3cbc73ffac

+ 1 - 1
Rx.NET/Source/src/System.Reactive/Disposables/CompositeDisposable.cs

@@ -110,7 +110,7 @@ namespace System.Reactive.Disposables
             _disposables = list;
             // _count can be read by other threads and thus should be properly visible
             // also releases the _disposables contents so it becomes thread-safe
-            Volatile.Write(ref _count, _disposables.Count());
+            Volatile.Write(ref _count, _disposables.Count);
         }
 
         /// <summary>