You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
The text was updated successfully, but these errors were encountered:
This happens when you try to clone .NET Framework objects that has inner references to almost everything in .NET runtime. Basically you are cloning whole .NET Runtime, and run out of stack memory. This is not a bug in clone code.
You should clone objects whose structure is known to you, or you are sure that their object graph is less then 10 000 objects. I do not recommend cloning classes that you or your team havn't written themself, nor with this code nor with any other clone code, its just a bad practice.
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:
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:
The text was updated successfully, but these errors were encountered: