Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to populate a collection c#

using System;
using System.Collections.Generic;
using System.Linq;

var vals = new List<int>() { 1, 2, 3, 4, 5, 6, 7 };

int sum = vals.Sum();
Console.WriteLine(sum);
Source by zetcode.com #
 
PREVIOUS NEXT
Tagged: #populate #collection
ADD COMMENT
Topic
Name
5+7 =