logicsmaze
Think Beyond Belief
Pages
Home
C#
Asp.net
OOPS
javascript
Sql
All Post
Wednesday, 28 November 2012
Yield in C#
foreach(int i in Table(5,10))
{
str=str+i.ToString();
}
public static IEnumerable Table(int num,int count)
{
for (int a = 1; a <= count; a++)
{
yield return a * num;
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment