【发布时间】:2010-12-01 02:19:00
【问题描述】:
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
namespace ConsoleApplication4
{
class Program
{
static void Main (string[] args)
{
var test1 = Test1(1, 2);
var test2 = Test2(3, 4);
}
static IEnumerable Test1(int v1, int v2)
{
yield break;
}
static IEnumerable Test2 (int v1, int v2)
{
return new String[] { };
}
}
}
“test1”似乎是一个 IEnumerable,其中 v1 和 v2(参数)作为字段,并且“Test1”未被调用。
“Test2”的作品是“设计的”:)
怎么了?
【问题讨论】: