Sorry, that was posted prematurely. Anyway, what I meant was:
public class User {
public IDictionary<string, dynamic> Attributes { get; set; }
}
I've tried this out and it works really well. You can then do castless
assignments such as:
var user = GetUser();
int age = user.Attributes("age");
string city = user.Attributes("city");
There are problems storing decimals however. If you store a decimal
and then try to retrieve it you'll receive an error about casting to/
from a double. I saw another thread about decimal storage, so
hopefully that will be resolved at some point.
user.Attributes.Add("amount", 500m);
decimal amount = user.Attributes("amount");
On Jun 1, 6:14 pm, Brian Vallelunga <
br...@vallelunga.com> wrote:
> Right now you can do a hybrid, such as:
>
> public class User {