From f2c90edf908b1bc1c49b924274b7c40c1ff98084 Mon Sep 17 00:00:00 2001 From: Stephane Delcroix Date: Fri, 30 Nov 2018 09:20:19 +0100 Subject: [PATCH] apply the increment to all ctors --- Xamarin.Forms.Core/DataTemplate.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xamarin.Forms.Core/DataTemplate.cs b/Xamarin.Forms.Core/DataTemplate.cs index 01715ca..567c32b 100644 --- a/Xamarin.Forms.Core/DataTemplate.cs +++ b/Xamarin.Forms.Core/DataTemplate.cs @@ -13,8 +13,8 @@ namespace Xamarin.Forms string _idString; public DataTemplate() { - _idString = GetType().FullName + idCounter++; - _id = idCounter; + _id = Interlocked.Increment(ref idCounter); + _idString = GetType().FullName + _id; } public DataTemplate(Type type) : base(type) -- 2.7.4