Here is my code:
private decimal _WeightedScoreProfitibility;
[PersistentAlias("WeightProfitibility.WeightNumber * ScoreProfitibility.ScoreNumber")]
public decimal? WeightedScoreProfitibility
{
get
{
try
{
return decimal.Parse(EvaluateAlias("WeightedScoreProfitibility").ToString());
}
catch ( NullReferenceException )
{
return 0;
}
}
}
I was getting an Object Null Reference on the my getter. I am assuming because the fields I am calculating in the Persistent Alias are 0 values.
I am catching the null reference error and now when i run the app It just hangs and spins. it never loads. How do I handle this null reference exception when the values I am calculating in the persistent alias are 0?