【发布时间】:2009-07-16 14:38:52
【问题描述】:
我的 c# 项目的 dll 中有一个 vb.net 基类。我在 C# 中创建了一个派生类。我用 C# 类的所有属性填充 C# 类,包括 vb 类的基本属性。
现在我通过 web 服务 (c#) 将它们发送到 jQuery 客户端。但是在客户端我只看到 vb 属性?
有人知道吗?
public class FilmItem : ContentItem // ContentItem is from VB DLL
{
public string Zender { get; set; }
public string Jaar { get; set; }
}
[WebMethod]
public IEnumerable GetContentItems(VBLib.GridRequest gridRequest)
{
ContentCache contentCache = new ContentCache();
return contentCache.GetFilms(gridRequest); // gives back a List<FilmItem>
}
刚刚发现,如果我删除 vb.net 类,C# 类中的所有属性都可以正常显示。还发现vb.net是这样声明的:
Public Class ContentItem
Inherits System.Collections.Generic.Dictionary(Of String, Object)
Implements IContentItem
是字典还是界面? (总结了我看到的属性)
问候, 亨克
【问题讨论】:
-
请发布一些示例代码。
标签: c# jquery vb.net web-services