Use of domainSet method
Use of domainSet method
Use of domainSet method
Use of domainSet method
Creates a set of the key (domain) values in a map
map.insert (1,"Rumman");
map.insert (2,"Osman");
map.insert (3,"Musar");
map.insert (4,"Inzamamul");
map.insert (5,"Hassan");
domain value 1 domain value 2 domain value 3 domain value 4 domain value 5
static void SampleMap (Args _args)
{
Set set;
SetEnumerator enumerator;
Map map = new Map (Types::Integer, Types::String);
map.insert (1,"Rumman");
map.insert (2,"Osman");
map.insert (3,"Musar");
map.insert (4,"Inzamamul");
map.insert (5,"Hassan");
set= map.domainSet();
enumerator = set.getEnumerator();
while (enumerator.moveNext())
{
info(strFmt(" domain value %1",enumerator.current()));
}
}
domain value 1
domain value 2
domain value 3
domain value 4
domain value 5
First understand the algorithm carefully. Then study the program line-by-line and compare it with the output. Finally, review the explanation section to strengthen your logic and programming understanding.
Rewrite the program without looking at the code. Modify values, conditions or logic and run it again. This helps improve confidence and strengthens coding skills much faster.
Sign in to save your progress and continue exactly where you left off.