diff --git a/csharp/Platform.Data.Doublets/ILinksExtensions.cs b/csharp/Platform.Data.Doublets/ILinksExtensions.cs index a94c8f579..214a3d204 100644 --- a/csharp/Platform.Data.Doublets/ILinksExtensions.cs +++ b/csharp/Platform.Data.Doublets/ILinksExtensions.cs @@ -164,13 +164,9 @@ public static TLinkAddress Delete(this ILinks links, public static void DeleteAll(this ILinks links) where TLinkAddress : IUnsignedNumber { var comparer = Comparer.Default; - for (var i = links.Count(); comparer.Compare(i, default) > 0; i = --i) + for (var i = links.Count(); comparer.Compare(i, default) > 0; i = links.Count()) { links.Delete(i); - if (links.Count() != --i) - { - i = links.Count(); - } } }