If _model.SubBrand
is a string, is there a more elegant way to convert it to a nullable int? What I'm doing right now feels clunky:
public int? SubBrandIndex
{
get
{
return _model.SubBrand == null ?
(int?)null : Convert.ToInt32(_model.SubBrand);
}
}