Here is an article explaining how to use yield break and yield return, http://iserialized.com/a-quick-start...d-yield-break/
In the article, there is a method without using yield,
Code:
public static List<int> GetResultList() 
{     
        var l = new List<int>();     
        for (int i = 0; i < 100; i++)     
        {         
              l.Add(i);     
        }     
        
        return l; 
}
And also there is another method using yield,
Code:
public static IEnumerable<int> GetResult() 
{     
       for (int i = 0; i < 100; i++)     
       {         
              yield return i;     
       } 
}
My question what GetResult does? Does it achieve the same thing as GetResultList? Thanks.