12
Answers

Convert List item to decimal

Rich

Rich

12y
3.7k
1
This seems really simple, but I can't figure out what I am missing. I am trying to cast an item from a list to a decimal. The error I am getting is Can not implicitly convert type to decimal.  Thanks in advance.

public class specialTeam
{
        public decimal Scores {get;set;}

        public specialTeam(string awayTeam)
        {
        Scores = bBall.getStatList().Where(t => t.Teams == awayTeam).Select(s => s.score);
 }
}

Answers (12)