0

I have the following in C# and I'm trying to convert it to vb.net.

   internal class MyDataRow : List<DataRowItem>, IDataRow
{

}

The rest of the code I've managed to convert myself it's just the empty class that I'm struggling with. This is so I can read in files with any columns and display them.

Edit:

Looking at the comment given and online I've got to the following:

Class MyDataRow
Inherits List(Of DataRowItem)
Implements IDataRow
End Class

I'm getting an error on the implements section.

This gives the following errors:

enter image description here

benjiiiii
  • 478
  • 10
  • 33
  • That's not an empty class. It's a class that inherits from List and implements IDataRow. Use the equivalent VB.NET syntax. Have you tried using the `Inherits` keyword? – Panagiotis Kanavos Dec 20 '18 at 10:27
  • I think you are not familiar with the `interface` concept, take a look at it in [msdn](https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/interfaces/) – Mohammad Karimi Dec 20 '18 at 10:34
  • Unless `MyDataRow` is an *abstract* or *partial* class, this C# code can't compile. Is that the *actual* declaration? No missing modifiers like `abstract` or `partial`? Does the source project compile in the first place? – Panagiotis Kanavos Dec 20 '18 at 10:46

1 Answers1

0

If you are just trying to convert this class, you can use below codes:

Friend Class MyDataRow
    Inherits List(Of DataRowItem)
    Implements IDataRow
End Class

And you have to implement IDataRow interface methods as well

Mohammad Karimi
  • 387
  • 2
  • 8