Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# loop through list of objects

var countries = new []{
        new { Name = "United States", Abbr = "US", Currency = "$" },
        new { Name = "Canada", Abbr = "CA", Currency = "$" }
    };

foreach(var country in countries)
{
      var Name = country.Name;
      .....
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #loop #list #objects
ADD COMMENT
Topic
Name
6+2 =