Do you mean can you use yield return
outside of a loop?
The answer is yes:
IEnumerable<string> GetStrings()
{
yield return "foo";
yield return "bar";
yield return "baz";
}
...but this would be an unusual use case of yield return
.