def ThisWorks() as IEnumerable: yield 1 yield 2 yield 3 def ThisWont(): yield 1 yield 2 yield 3 C# sees definitions as: IEnumerable ThisWorks() IEnumerable ThisWont() foreach(int i in f.ThisWorks()) MessageBox.Show(i.ToString()); foreach(int i in f.ThisWont()) MessageBox.Show(i.ToString()); 'boolib.MyClass.ThisWont()' is inaccessible due to its protection level (CS0122)