Skip to content

Instantly share code, notes, and snippets.

@Koki-Shimizu
Last active December 21, 2015 14:38
Show Gist options
  • Save Koki-Shimizu/6320604 to your computer and use it in GitHub Desktop.
Save Koki-Shimizu/6320604 to your computer and use it in GitHub Desktop.
LINQ Sample. All method.
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