我使用VS2008框架3.5,我期待有關LINQ首次,下面這個樣子http://msdn.microsoft.com/it-it/library/bb385204(VS.90).aspx與第一LINQ第一個問題
這些http://msdn.microsoft.com/it-it/library/bb385164(v=vs.90).aspx
創建數據源,但我無法導入/使用linq。製作consoleApplication System.Core.dll引用並導入System.Linq應該是自動對吧?!
寫入主:
Dim students = GetStudents()
'Dim students As List(Of Student) = GetStudents() 'the same thing with this one
Dim studentQuery = From currentStudent In students _
Where currentStudent.Rank <= 10 _
Select currejt
的IDE不喜歡學生在查詢,並說:
Error 1 Expression of type 'System.Collections.Generic.IEnumerable(Of ConsoleApplication1.Module1.Student)'
is not queryable. Make sure you are not missing an assembly reference and/or namespace
import for the LINQ provider. ConsoleApplication1
在那裏我錯了!?
,如果我嘗試「進口System.Linq的」它說
警告1個命名空間或進口「System.Linq的」 不包含任何公共成員,或者無法找到指定的類型。確保 名稱空間或類型已定義,並且至少包含一個公開的成員 。確保導入的元素名稱不使用任何別名。
那麼*你*有一個參考System.Core? –