Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Commit

Permalink
Added to examples SwitchAndFor demo method
Browse files Browse the repository at this point in the history
  • Loading branch information
micskeiz committed Nov 10, 2015
1 parent 67db993 commit b54af2b
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Examples/SEViz.Demos/SEViz.Demos/Simple.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,33 @@ public void ForLoop(int bound, bool decision)
}
}
}

public int SwitchAndFor(int type, bool b, int bound)
{
switch (type)
{
case 0:
int sum = 0;
for (int i = 0; i < 3; i++)
{
sum += i;
if (i == bound)
{
break;
}
}
return sum;
case 1:
if (b)
{
return 1;
}
break;
default:
break;
}

return -1;
}
}
}

0 comments on commit b54af2b

Please sign in to comment.