Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Having Trouble Using C# yield Equivalent in VB.

$
0
0

 I have spent hours finding solution on the INTERNET but still no result. Could someone kindly give me the VB equivalent of The following Code without using the Yield keyword since  VB does not have it as it keywords

My Code is as follows in C#

private IEnumerable InternalChildren()
        {
            IEnumerator enumerator = GetItems().GetEnumerator();
            while (enumerator.MoveNext())
            {
                if (enumerator.Current is TabItem)
                    yield return enumerator.Current;
                else
                    yield return this.ItemContainerGenerator.ContainerFromItem(enumerator.Current) as TabItem;
            }
        }


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>