I'd like to see them fix automatic properties. A lot of people have complained that there should be a way to set the default like... public int A { get; set; default { return 1; } But i think they should take it further. I'm a big fan of the CSLA framework hence i have a lot of properties following
public int A
{
get
{
CanReadProperty(PropertyNames.A, true);
return m\_a;
}
set
{
CanWriteProperty(PropertyNames.A, true);
if (!m\_a.Equals(value))
{
m\_a = value;
PropertyHasChanged(PropertyNames.A);
}
}
}
(I know new CSLA is different but it's still just as much repetition) I would love to be able to say
public int A { get; set; from CslaProperty }
where CslaProperty is a template. It's sort of like adding inheritance to Properties. I'd also like to be able to take it further so you could say...
public string A
{
get;
set
{
if (value == null)
value = "";
@templateBase = value;
}
}
This would stop the really annoying thing about automatic properties where you use them, then you want to make a minor change and have to go to the trouble of making a full property