ToList method (with integers)
Description
The ToList method converts a sequence to a list.
Sample
This sample converts an array of int values to a list of int.
var data := int[] {5} { 1, 2, 3, 4, 5 }
var result := data:ToList()
foreach var item in result
Console.WriteLine(item)
next
Output
1
2
3
4
5
Complete sample
using System
using System.Linq
using System.Collections.Generic
procedure Execute() as void strict
var data := int[] {5} { 1, 2, 3, 4, 5 }
var result := data:ToList()
foreach var item in result
Console.WriteLine(item)
next
return