diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache index c03ea276b1a..5d8beeda3b9 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache @@ -193,6 +193,7 @@ ( this.{{name}} == input.{{name}} || this.{{name}} != null && + input.{{name}} != null && this.{{name}}.SequenceEqual(input.{{name}}) ){{#hasMore}} && {{/hasMore}}{{/isContainer}}{{/vars}}{{^vars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/vars}}; {{/useCompareNetObjects}} diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index ddeb2563e1d..688062a9077 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -171,6 +171,7 @@ this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; ( this.{{name}} == input.{{name}} || this.{{name}} != null && + input.{{name}} != null && this.{{name}}.SequenceEqual(input.{{name}}) ){{#hasMore}} && {{/hasMore}}{{/isContainer}}{{/vars}}{{^vars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/vars}}; }