| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 548 人关注过本帖
标题:不知道缺少哪个命名空间??
取消只看楼主 加入收藏
huazai2012s
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2012-10-29
结帖率:33.33%
收藏
 问题点数:0 回复次数:0 
不知道缺少哪个命名空间??
using System;
using System.Collections.Generic;
using System.Data.Linq;
using System.Linq;
using System.Text;


namespace BegVCSharp_27_1_FirstLINQtoSQLquery
{
    class Program
    {
        static void Main(string[] args)
        {
            NorthwindDataContext NorthwindDataContext = new NorthwindDataContext();
            var queryresults = from c in NorthwindDataContext.customers
                              where c.country = "USA"
                              select new
                              {
                                  ID = c.customerID,
                                  Name = ,
                                  City = c.city,
                                  state = c.regin
                              };
            foreach (var item in queryresults)
            {
                Console.WriteLine(item);
            };
            Console.WriteLine("press enter/return to continue ...");
            Console.ReadKey();
        }
    }
}
Error    1    The type or namespace name 'NorthwindDataContext' could not be found (are you missing a using directive or an assembly reference?)    C:\Users\dell\AppData\Local\Temporary Projects\ConsoleApplication1\Program.cs    15    13    ConsoleApplication1
Error    2    The type or namespace name 'NorthwindDataContext' could not be found (are you missing a using directive or an assembly reference?)    C:\Users\dell\AppData\Local\Temporary Projects\ConsoleApplication1\Program.cs    15    61    ConsoleApplication1



搜索更多相关主题的帖子: 空间 命名 where 
2012-11-13 21:55
快速回复:不知道缺少哪个命名空间??
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016917 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved