Error BC30154

Class library usage, coding and language questions.
dal
Posts: 72
Joined: Thu Jun 24, 2010 8:59 am

Error BC30154

Post by dal » Fri Jun 25, 2010 7:44 am

Hi,

I am getting the following error in the CSVConnector.vb file when I try to compile (I took this file from the Sample Folder).

Class 'CSVConnector' must implement 'ReadOnly Property Rows() As System.Data.DataRowCollection' for interface 'ICSVConnector'. Implementing property must have matching 'ReadOnly' or 'WriteOnly' specifiers. (BC30154)

But I don't find any issues in ICSVConnector.vb file also, here Rows() and Header() have been specified as

Public Interface ICSVConnector
ReadOnly Property Rows() As DataRowCollection
ReadOnly Property Header() As DataColumnCollection
End Interface

Any help appreciated !!!

Thanks,
Dal

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Error BC30154

Post by Support Team » Fri Jun 25, 2010 1:20 pm

When you implement an interface in VB, you have to explicitly mark every implemented property/method; i.e. in the CSVConnector class you have to change the property declaration as follows:
Public ReadOnly Property Rows() As DataRowCollection Implements ICSVConnector.Rows
...
Public ReadOnly Property Header() As DataColumnCollection Implements ICSVConnector.Header
...
Regards,
Alex
Ranorex Support Team

dal
Posts: 72
Joined: Thu Jun 24, 2010 8:59 am

Re: Error BC30154

Post by dal » Tue Jun 29, 2010 12:44 pm

Yes It works...

Thanks for the info..

--Dal