Beispiel #1
0
 private int GetScoreByPropertyName(ScoreCard <int> scores, string propName)
 {
     return((int)scores.GetType().GetProperty(propName).GetValue(scores));
 }
Beispiel #2
0
 private void SetScoreByPropertyName(ScoreCard <int> scores, string propName, int value)
 {
     scores.GetType().GetProperty(propName).SetValue(scores, value);
 }
Beispiel #3
0
        private bool IsCategoryScored(string propName)
        {
            var isScored = (bool)isCategoryScored.GetType().GetProperty(propName).GetValue(isCategoryScored);

            return(isScored == false);
        }