using System.Linq;
…
double total = myList.Sum(item => item.Amount);
More Related Contents:
- Find index of returned list result C#
- Sum multidimensional array over dimensions [closed]
- How do I clone a generic list in C#?
- Remove duplicates from a List in C#
- Check whether an array is a subset of another
- How to create List of open generic type of class?
- How create a new deep copy (clone) of a List?
- How to get values of selected items in CheckBoxList with foreach in ASP.NET C#?
- Adding items to a LIST of objects results in duplicate Objects when using a NEW in a Loop
- C# List to string with delimiter
- Combination of List
- Getting all file names from a folder using C# [duplicate]
- Check if a string contains an element from a list (of strings)
- How to get the closest number from a List with LINQ?
- How to remove item from list in C#?
- Can Newtonsoft Json.NET skip serializing empty lists?
- Create list of variable type
- Case-Insensitive List Search
- How do I get a list of installed updates and hotfixes?
- C#: How to add subitems in ListView
- IEnumerable vs IReadonlyCollection vs ReadonlyCollection for exposing a list member
- How do I check if a given value is a generic list?
- Select distinct by two properties in a list
- Get a list of distinct values in List
- Using Linq Except not Working as I Thought
- How to Quickly Remove Items From a List
- Casting IEnumerable to List
- How to sort a list / array of string version number?
- How to convert c# generic list to json using json.net?
- How do I transform a List into a DataSet?