0
使用VB.NET,我有部份类将IEnumerable(Of Object)转换为实现IEnumerable(Of Object)的类?
Public Class MyCollectionClass
Implements IEnumerable(Of MyClass)
Public Property MadeThisClassCuzINeedToSetThis() As String
' code here
End Class
我想这样做,但得到一个异常说我不能这样做演员。
Dim objColl As MyCollectionClass
objColl = CType(IEnumerable(Of MyClass), MyCollectionClass)
有谁能告诉我如何让这个工作。谢谢。
你不觉得结束类正在被视为字符串? –
你好,欢迎来到Stack Overflow。我想你也许应该删除C#标记 - 我在这里看不到任何C#! – Baldrick
Doh! Thx,C#是自动建议的。看起来它已被删除。 – pseudoware