1

I'm confused which type I use to create model in project, Struct or Class? There're about ten struct and some collections. I'm a newbie.

SubmarineX
  • 850
  • 5
  • 19
  • 38

3 Answers3

2

You should never create a mutable struct.

View models should always be classes.

Community
  • 1
  • 1
SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
2

You should always use classes as ViewModel or Model in WPF.

Nikhil Agrawal
  • 47,018
  • 22
  • 121
  • 208
1

As a newbie, don't use structs. There are subtleties to the way they work that will mess you up.

spender
  • 117,338
  • 33
  • 229
  • 351