diff --git a/XmlSchemaClassGenerator/TypeModel.cs b/XmlSchemaClassGenerator/TypeModel.cs index de2d2cc..8cb1d7e 100644 --- a/XmlSchemaClassGenerator/TypeModel.cs +++ b/XmlSchemaClassGenerator/TypeModel.cs @@ -275,7 +275,7 @@ public override CodeTypeDeclaration Generate() var param = new CodeParameterDeclarationExpression(typeof(string), "propertyName = null"); param.CustomAttributes.Add(new(TypeRef())); - var threadSafeDelegateInvokeExpression = new CodeSnippetExpression($"{propertyChangedEvent.Name}?.Invoke(this, new System.ComponentModel.PropertyChangedEventArgs({param.Name}))"); + var threadSafeDelegateInvokeExpression = new CodeSnippetExpression($"{propertyChangedEvent.Name}?.Invoke(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName))"); var onPropChangedMethod = new CodeMemberMethod { Name = OnPropertyChanged,