Skip to content

StackOverflow when Copy() my Class which inherits from INotifyPropertyChanged #18

@wolfomat

Description

@wolfomat

Hey there,

i've got a class with three custom Enum types, some bools and some strings.
Systemwise i'm using the ms-class System.ServiceProcess.ServiceController and System.Windows.Controls.DatePicker.
last but not least i implement the INotifyPropertyChanged Interface.
public event PropertyChangedEventHandler PropertyChanged;

and:

 private void NotifyPropertyChanged(String propertyName)
    {
        if (PropertyChanged != null)
        {
            PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
    }

The error is a stack overflow @ line 28:
var cloneObject = CloneMethod.Invoke(originalObject, null);
Error:

System.StackOverflowException was unhandled
HResult=-2147023895
Message=Eine Ausnahme vom Typ "System.StackOverflowException" wurde ausgelöst.
InnerException:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions