c# - Can ViewModel have property of type IEnumerable<> instead of Array -


i construct viewmodel this:

myviewmodel {   (...)   ienumerable<myclass> items {get; set;} } 

should ever care (be afraid) not passing evaluated values in code below?

myviewmodel {   myclass[] items {get; set;} } 

sometimes lazy evaluation causes problems.

just make sure new concrete instance of ienumerable in view model constructor, , shouldn't have problems. list empty.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -