Unintialized Properties and Binding

Unintialized Properties and Binding

Old forum URL: forums.lhotka.net/forums/t/8107.aspx


RumbleCow posted on Monday, December 07, 2009

20vb-2.1.4-070223

I remember when first working with CSLA one of the first things I found was that private instance variables of type 'String' had to e initialized or binding would fail. This is easy to work around but now have the need to have csla-based object types that need to have the ability to be nothing. How can I get around this?

The exception happens on the 'getValue' on the last line below in the CopyState method of the undoable base.

For Each field As FieldInfo In fields
' make sure we process only our variables
If field.DeclaringType Is currentType Then
' see if this field is marked as not undoable
If Not NotUndoableField(field) Then
' the field is undoable, so it needs to be processed
Dim value As Object = field.GetValue(Me)

throws the following error:

System.StackOverflowException was unhandled

Copyright (c) Marimer LLC