diff --git a/XmlSchemaClassGenerator/TypeModel.cs b/XmlSchemaClassGenerator/TypeModel.cs index a46d918d..19b77c11 100644 --- a/XmlSchemaClassGenerator/TypeModel.cs +++ b/XmlSchemaClassGenerator/TypeModel.cs @@ -1115,7 +1115,8 @@ public void AddMembersTo(CodeTypeDeclaration typeDeclaration, bool withDataBindi if (collectionType == typeof(System.Array)) { var initTypeReference = propertyType.GetReferenceFor(OwningType.Namespace, collection: false, forInit: true, attribute: IsAttribute); - initExpression = new CodeArrayCreateExpression(initTypeReference); + var arrayReference = CodeUtilities.CreateTypeReference(typeof(System.Array), Configuration); + initExpression = new CodeMethodInvokeExpression(new CodeMethodReferenceExpression(new CodeTypeReferenceExpression(arrayReference), "Empty", initTypeReference)); } else {