473,770 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error in implementing interface Property

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
Nov 21 '05 #1
2 6790
"larzeb" <la****@communi ty.nospam> schrieb:
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.Addr Line1'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2
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.

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
16259
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information Server might not be running or the path exists and is redirected to another machine. Please check the status of this virtual directory in the Internet Services Manager."
4
2557
by: Steven Quail | last post by:
Hi to all, I am trying to get the hang of using interfaces and for some reason I am getting the "inconsistent accessibility where property ... is less accessible than property ...(cs0052)". What I have is the following: (sorry if the syntax is incorrec)
1
1711
by: Roland | last post by:
Hi All, I'm trying to generate a C# wrapper for a Windows type library using the following command line ... csc /target:library /doc:Interop.MyLibrary.xml /unsafe Interop.MyLibrary.cs >Interop.MyLibrary.log And receiving the following error message ... Interop.MyLibrary.cs(499,18): error CS0536: 'Interop.MyLibrary.IImpBaseCollection_SinkHelper' does not implement interface member 'Interop.MyLibrary.IImpBaseCollection.Item(object)'....
6
5668
by: Kerry Sanders | last post by:
I am working on a project for work where I need a specialized type converter to convert the value of a string which is edited in a grid back to the underlying object type from the cell. The value in the cell is displayed as a string from the ToString() method in the class. Anyway, I am trying to implement my converter, but I am having a little trouble understanding it fully and how exactly to implement some of the methods, especially...
1
3086
by: lapin | last post by:
I'm trying to get access to session variables from an IHttpHandler class. In several places I've seen the solution posted as in this message: >If you define your own custom HttpHandler, you need to >import the >System.Web.SessionState namespace, you >need it to implement the IRequiresSessionState interface
0
913
by: ljlevend | last post by:
Is there any way to implement on a property or function who's return type is an inheritor of the corresponding property or function in the interface? For example, I would like to be able to do the following: Public Interface ITest ReadOnly Property TestProperty() As BaseClass End Interface Public Class BaseClass End Class
2
3441
by: DaTurk | last post by:
I have three interfaces, lets call them General, Client, Server. public interface General { public Value{get;} } public interface Client : General {}
3
1668
by: David Veeneman | last post by:
I'm new to VB.NET, and I am translating an object model from C# to VB.NET, and I have come across an odd problem implementing an interface. The interface is a custom interface, IDrillDown, which declares one read-only property with the following VB.NET signature: Public ReadOnly Property ActiveText() As String I have declared the interface in the class declaration, like this:
6
8519
by: Raj Wall | last post by:
Hi, I am trying to implement the IEqualityComparer interface for a struct so I can use it as the Key for a Dictionary. My struct declaration has: public struct Ring : IEqualityComparer { .... } and I am trying to implement the Equals and GetHashCode methods.
0
9619
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10102
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9910
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6712
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.