Generic collections in Swift
Forums:
//List of integer
var intList = Array<Int>()
intList.append(5)
//Dictionary
var dic = Dictionary<Int, String>()
dic[1] = "one"
//Set
var set = Set<Double>();
set.insert(3.14);
- Log in to post comments