VB.NET泛型C#语法 [英] VB.NET generics to C# syntax
本文介绍了VB.NET泛型C#语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你能不能让我看看VB.NET code的C#相当于:
公共部分类指数
继承System.Web.Mvc.Viewpage(名单(任务))
末级
我不知道在哪里/如何将它添加在C#中:
公共部分类DirList:System.Web.Mvc.ViewPage
{}
在code是假设告诉类期望从控制器的任务列表...
解决方案
公共部分类DirList:System.Web.Mvc.ViewPage<名单,LT;任务>>
{}
Could you please show me the C# Equivalent of this VB.NET code:
Public Partial Class Index
Inherits System.Web.Mvc.Viewpage(Of List(Of Task))
End Class
I am not sure where/how to add it in for C#:
public partial class DirList : System.Web.Mvc.ViewPage
{
}
The code is suppose to tell the class to expect a list of tasks from the controller...
解决方案
public partial class DirList : System.Web.Mvc.ViewPage<List<Task>>
{
}
这篇关于VB.NET泛型C#语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文