Error in implementing interface Property

L

larzeb

I receive the following error from the compiler:

ScheduledInfo' must implement 'Property AddrLine1() As String' for
interface 'ICASSBatch'. Implementing property must have matching
'ReadOnly'/'WriteOnly' specifiers.

The interface:
Public Interface ICASSBatch
Property AddrLine1() As String
Property BarCode() As String
Property City() As String
Property State() As String
Property Zip5() As String
...
End Interface

The class implementing the interface:
Public Class ScheduledInfo
Implements ICASSBatch

...
Public Property AddrLine1() As String
Get
Return _addrLine1
End Get
Set(ByVal Value As String)
_addrLine1 = Value
End Set
End Property

I don't understand the error message. Can anyone help?

TIA Lars
 
H

Herfried K. Wagner [MVP]

larzeb said:
ScheduledInfo' must implement 'Property AddrLine1() As String' for
interface 'ICASSBatch'. Implementing property must have matching
'ReadOnly'/'WriteOnly' specifiers.

The interface:
Public Interface ICASSBatch
Property AddrLine1() As String
Property BarCode() As String
Property City() As String
Property State() As String
Property Zip5() As String
...
End Interface

The class implementing the interface:
Public Class ScheduledInfo
Implements ICASSBatch

...
Public Property AddrLine1() As String

Replace the line above with 'Public Property AddrLine1() As String
Implements ICASSBatch.AddrLine1'.
 
C

Chris Dunaway

In addition to the other responses, if you put the cursor on the end of
the Implements line and press Enter, VS (2003 at least) will
automatically create the method and property stubs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top