Created
January 11, 2016 05:06
-
-
Save kawa-xxx/d187982a64a6c9af7d0a to your computer and use it in GitHub Desktop.
yield サンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
var hoge = GetName(); | |
hoge.Dump(); | |
} | |
IEnumerable<string> GetName() | |
{ | |
yield return "hoge"; | |
yield return "huga"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment