2013-05-22 34 views
0
hi i have the following code: 

但IM得到一個錯誤 「newwcf.Client」不包含定義「在哪裏」
請幫助..「newwcf.Client」不包含定義「在哪裏」

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Runtime.Serialization; 
using System.ServiceModel; 
using System.Text; 
using System.Data; 

namespace newwcf 
{ 
    public class myservice : Imyservice 
    { 
     public List<ClientDetails> getClient() 
     { 
      List<ClientDetails> client = new List<ClientDetails>(); 
      var sql = Client.Where(cn => cn.ClientName).ToList(); //getting the error here 
      return sql; 

     } 

    } 
} 

回答

2

C#是區分大小寫的...你應該嘗試

var sql = client.Where(cn => cn.ClientName).ToList();

+0

:與客戶端還,同樣的問題:( – Prkh

+0

嘗試做你有一個客戶端類?客戶端變量引用List ,所以應該有一個.Where方法。 – hallie

+0

是的,我有一個客戶端類 – Prkh