Empty manufactures an empty sequence and requires just a type argument:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main()
{
foreach (string s in Enumerable.Empty<string>())
{
Console.Write(s); // <nothing>
}
}
}
| w_w___w___.___ja___va_2_s._c___o___m_ | Contact Us |
| Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
| All other trademarks are property of their respective owners. |