Using optional private field param to register property to waive loadProperty

CSLA .NET 3.5 property declaration syntax

CSLA .NET 3.5 also supports a different syntax where you use private fields to store the values. This technique is faster than using managed fields, but requires that you declare and maintain your own fields. The syntax for declaring such a property is here.

One thing I figured out is, by using this new syntax means you are not going to use LoadProperty method anymore, because the method getter only use managed field to store staus/flag, the actual value of the property will always return from the private field.

Another word, the value stored in managed field/Property Info object is useless if you are using

get { return GetProperty<string>(NameProperty, _name); }

in your property getter.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s