首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >常量接触utility.searchbyemail()

常量接触utility.searchbyemail()
EN

Stack Overflow用户
提问于 2012-11-13 21:36:49
回答 1查看 131关注 0票数 0

我正在尝试检查联系人是否存在,或者没有使用Utility.searchbyemail选项。

示例:IList myList = Utility.SearchContactByEmail(authdata,emailAddress,out nextChunkId);

上面的语句引发一个错误: Error 不能隐式地将'System.Collections.Generic.IList‘类型转换为’System.Collection tions.Generic.IList‘。存在显式转换(是否缺少强制转换?)

任何帮助都是非常感谢的。下面是我的代码供参考,我希望我有所有的名称空间到位。

代码语言:javascript
复制
enter code here
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using ConstantContactBO;
using ConstantContactUtility;
using System.Data;
using System.Data.SqlClient;

namespace WebApplication4
{
public partial class WebForm1 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ConstantContactBO.Contact c = new ConstantContactBO.Contact();
        c.EmailAddress = "";
        AuthenticationData authdata = new AuthenticationData();
        authdata.Username = "";
        authdata.Password = "";
        authdata.ApiKey = "";

        // get user Contact List collection
        string nextChunkId;
        string currentChunk;
        string x = "a@abc.com";
        string[] emailAddress = new string[]{x.Trim()};
        IList<ContactList> lists = Utility.GetUserContactListCollection(authdata, out nextChunkId);
        **IList<Contact> myList = Utility.SearchContactByEmail(authdata, emailAddress, out nextChunkId);** //Throws Error here
    }
}
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-11-13 22:12:59

我解决了。问题在于名称空间WebApplication4的使用。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13369233

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档