using System.Collections.Generic;
public string name { get; set; }
public float mass { get; set; }
public static void Main(string[] args)
static void mainLogic() {
Console.WriteLine("I'm running!");
List<string> myList = new List<string>();
foreach (string name in myList)
List<Isotope> isotopes = new List<Isotope>();
isotopes.Add(new Isotope() {
isotopes.Add(new Isotope() {
foreach (Isotope isotope in isotopes)
Console.WriteLine("Isotope: {0}, Mass: {1}, Mass + 10: {2}", isotope.name, isotope.mass, sum(isotope.mass, 10));
float isotopesMassSum = calculateSum(isotopes);
Console.WriteLine("Sum of isotope masses: {0}", isotopesMassSum);
static float sum(float s1, float s2)
static float calculateSum(List<Isotope> isotopesList)
foreach (Isotope isotope in isotopesList)
result = sum(result, isotope.mass);