Possible Duplicate:
Can I implement yield return for IEnumerable functions in VB.NET?
How to convert this Python code to VB? Is there any yield method in visual basic? Please help me.
def f(x, y):
for nx in range(max(0, x-1), min(3, x+2)):
for ny in range(max(0, y-1), min(3, y+2)):
yield (nx, ny)