SyntaxFix
Write A Post
Hire A Developer
Questions
Another alternative:
myPlanetsList.Select(i => i.Moons).Sum();