抽象类/方法,如何C# - > VB.NET [英] Abstract class / method , how to C# --> VB.NET
本文介绍了抽象类/方法,如何C# - > VB.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我对VB更熟悉,我买的书有C#示例,现在我被卡住了。
如何在VB.NET中实现以下内容?
public abstract class ENTBaseDATA< T> T:IENTBaseEntity
{
public abstract List< T>选择();
public abstract T Select(int id);
等....此代码已被转换:)
}
完整的代码见第2章下载:
http://www.wrox.com/WileyCDA/WroxTitle/productCd-0470396865,descCd-DOWNLOAD.html
解决方案
您可以尝试使用 C#/ VB.NET转换器。输出:
Public MustInherit类ENTBaseDATA(Of T As IENTBaseEntity)
Public MustOverride函数[Select]()As List (Of T)
Public MustOverride Function [Select](ByVal id As Integer)As T
',then other code'
End Class
I am more familiar with VB and the book i bought has C# examples, now i am stuck.
How do I implement the following in VB.NET?
public abstract class ENTBaseDATA<T> where T : IENTBaseEntity
{
public abstract List<T> Select();
public abstract T Select(int id);
etc....This code already is converted :)
}
For complete code see Chapter 2 download:
http://www.wrox.com/WileyCDA/WroxTitle/productCd-0470396865,descCd-DOWNLOAD.html
解决方案
You could try to use a C# / VB.NET converter. Output:
Public MustInherit Class ENTBaseDATA(Of T As IENTBaseEntity)
Public MustOverride Function [Select]() As List(Of T)
Public MustOverride Function [Select](ByVal id As Integer) As T
' and then the other code '
End Class
这篇关于抽象类/方法,如何C# - > VB.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文