diff --git a/sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/csharp/CSharpGenerator.java b/sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/csharp/CSharpGenerator.java index b6fd5d774..a5dc0b235 100644 --- a/sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/csharp/CSharpGenerator.java +++ b/sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/csharp/CSharpGenerator.java @@ -1141,7 +1141,7 @@ private CharSequence generateArrayProperty( generateDocumentation(indent, fieldToken), typeName, propName, offset, generateArrayFieldNotPresentCondition(fieldToken.version(), - indent + INDENT + INDENT, "new " + typeName + "[0]"), + indent + INDENT + INDENT, "System.Array.Empty<" + typeName + ">()"), accessOrderListenerCallDoubleIndent)); sb.append(String.format("\n" + @@ -1155,7 +1155,7 @@ private CharSequence generateArrayProperty( generateDocumentation(indent, fieldToken), typeName, propName, offset, generateArrayFieldNotPresentCondition(fieldToken.version(), - indent + INDENT + INDENT, "new " + typeName + "[0]"), + indent + INDENT + INDENT, "System.Array.Empty<" + typeName + ">()"), accessOrderListenerCall)); if (typeToken.encoding().primitiveType() == PrimitiveType.CHAR)