Last active
December 21, 2015 14:38
-
-
Save Koki-Shimizu/6320604 to your computer and use it in GitHub Desktop.
LINQ Sample.
All method.
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace LINQsample01 | |
{ | |
class Sample | |
{ | |
public void Do() | |
{ | |
var nums = Enumerable.Range(1, 100); | |
if (nums.All(num => num != 0)) | |
{ | |
Debug.WriteLine("No Contain Zero"); | |
} | |
else | |
{ | |
Debug.WriteLine("Contain Zero"); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment