From 821d470e4b3bbd6d5fda24b008a217e2b5a42b36 Mon Sep 17 00:00:00 2001 From: Johnnyxy <30o_24ff4snfv2oz@byom.de> Date: Tue, 17 May 2016 14:19:42 +0200 Subject: [PATCH] x fixed VS2013 - C# 6 auto-property initializers - issue --- S7.Net.Common/Types/DataItem.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/S7.Net.Common/Types/DataItem.cs b/S7.Net.Common/Types/DataItem.cs index 87a294e..b5d7e78 100644 --- a/S7.Net.Common/Types/DataItem.cs +++ b/S7.Net.Common/Types/DataItem.cs @@ -6,8 +6,13 @@ public VarType VarType { get; set; } public int DB { get; set; } public int StartByteAdr { get; set; } - public int Count { get; set; } = 1; + public int Count { get; set; } public object Value { get; set; } + + public DataItem() + { + Count = 1; + } } }