From 3ab53b6caae98b5c726c9fdca3102d69b77a3a03 Mon Sep 17 00:00:00 2001 From: neuecc Date: Tue, 7 Sep 2021 19:09:57 +0900 Subject: [PATCH] single collection does not added in CloneCollection, #3 --- sandbox/ConsoleApp/ConsoleApp.csproj | 13 +++++++++---- sandbox/ConsoleApp/Program.cs | 6 ++++-- .../Internal/CloneCollection.cs | 1 + 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/sandbox/ConsoleApp/ConsoleApp.csproj b/sandbox/ConsoleApp/ConsoleApp.csproj index 41f1d5a..9d80c7b 100644 --- a/sandbox/ConsoleApp/ConsoleApp.csproj +++ b/sandbox/ConsoleApp/ConsoleApp.csproj @@ -1,8 +1,13 @@ - - Exe - net6.0 - + + Exe + net6.0 + enable + + + + + diff --git a/sandbox/ConsoleApp/Program.cs b/sandbox/ConsoleApp/Program.cs index 23b8e79..c7c16e2 100644 --- a/sandbox/ConsoleApp/Program.cs +++ b/sandbox/ConsoleApp/Program.cs @@ -1,4 +1,5 @@ -using System; +using ObservableCollections; +using System; namespace ConsoleApp { @@ -6,7 +7,8 @@ namespace ConsoleApp { static void Main(string[] args) { - Console.WriteLine("Hello World!"); + + } } } diff --git a/src/ObservableCollections/Internal/CloneCollection.cs b/src/ObservableCollections/Internal/CloneCollection.cs index 4e9268e..9593574 100644 --- a/src/ObservableCollections/Internal/CloneCollection.cs +++ b/src/ObservableCollections/Internal/CloneCollection.cs @@ -22,6 +22,7 @@ namespace ObservableCollections.Internal { this.array = ArrayPool.Shared.Rent(1); this.length = 1; + this.array[0] = item; } public CloneCollection(IEnumerable source)