Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
public IEnumerable<Foo> GetFooWithBar()
{
foreach(Foo foo in _myFooList)
{
if(foo.IsBarrable)
{
foo.Bar = BarRepository.RetrieveBar(foo.Id);
yield return foo;
}
}
}
IEnumerable<Foo> mylist = ThatOtherClass.GetFooWithBar();
foreach(Foo foo in mylist)
{
DoSomeStuff();
}
foreach(Foo foo in ThatOtherClass._myFooList)
{
if(foo.IsBarrable)
{
foo.Bar = BarRepository.RetrieveBar(foo.Id);
DoSomeStuff();
}
}
public IEnumemerable<PersonAdress> GetPersonAdresses()
{
foreach(Person person in _personsList)
{
Adress adress = getAdres(person.Id);
yield return new PersonAdress(person, adress);
}
}
IEnumerable<int> numbers = GetNumbers();
private IEnumerable<int> GetNumbers()
{
for(i = 0;i<100;i++) yield return i;
}
IEnumerable<int> numbers = new List<int>(GetNumbers());
private IEnumerable<int> GetNumbers()
{
for(i = 0;i<100;i++) yield return i;
}
foreach(int i in GetNumbers()
{
Console.WriteLine(i);
}
private IEnumerable<int> GetNumbers()
{
for(i = 0;i<100;i++) yield return i;
}
private IEnumerable<int> GetNumbers()
{
for(i = 0;i<100;i++)
if(1>50) break;
yield return i;
}