You can try using the LINQ ToDictionary() method. It pairs up every field name with its value and bundles them into a clean key-value collection (a Dictionary). This will replace your manual loop and make the code much shorter and simpler. See this for reference: https://stackoverflow.com/questions/3611126/using-todictionary
