The ToList
method you are looking for is an extension method. Try adding this using
directive to the top of your file:
using System.Linq;
By adding this using
directive you are indicating to the compiler that any extension methods in that namespace should be imported. It's kind of a shame that there isn't more help from Visual Studio around importing extension methods (ReSharper does this rather nicely).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…