I have two projects each with a different namespace. The first defines an
interface with two methods.
namespace SWPStandards
{
public interface ISWPDisplayMessage
{
void DisplayMessage(string message);
void DisplayMessage(string message, bool popUp);
}
}
the second implements the interface.
namespace BRBWinTester
{
public class Form1 :
System.Windows.Forms.Form,ISWPDisplayMessage,ISWPH andleException
{
...
public void DisplayMessage(string message, bool popUp)
{
statusBar1.Text = message;
if (popUp)
MessageBox.Show(message);
}
void DisplayMessage(string message)
{
DisplayMessage(message,SWP.Const.NoPopUP);
}
}
}
I have implemented the two required methods one both without qualifying the
method with SWPStandards.ISWPDisplayMessage. Why does the compiler generate
the following exception?
'BRBWinTester.Form1' does not implement interface member
'SWPStandards.ISWPDisplayMessage.DisplayMessage(st ring)'.
'BRBWinTester.Form1.DisplayMessage(string)' is either static, not public, or
has the wrong return type.
Why doesn't it generate the same message for the other method?
Any assistance would be appreciated. 4 1241
in your code, in the class implementing the interface, the first method is
public, the second is not ... the problem is not on FQN for the methods, but
ob the modifier ...
an interface only lists public methods.
by default, members of a class are protected.
"Ben R. Bolton" <ns****@xbridgesystems.com> wrote in message
news:O8****************@TK2MSFTNGP09.phx.gbl... I have two projects each with a different namespace. The first defines an interface with two methods. namespace SWPStandards
{
public interface ISWPDisplayMessage
{
void DisplayMessage(string message);
void DisplayMessage(string message, bool popUp);
} } the second implements the interface. namespace BRBWinTester
{
public class Form1 : System.Windows.Forms.Form,ISWPDisplayMessage,ISWPH andleException
{
..
public void DisplayMessage(string message, bool popUp)
{
statusBar1.Text = message;
if (popUp)
MessageBox.Show(message);
} void DisplayMessage(string message)
{
DisplayMessage(message,SWP.Const.NoPopUP);
} }
} I have implemented the two required methods one both without qualifying
the method with SWPStandards.ISWPDisplayMessage. Why does the compiler
generate the following exception?
'BRBWinTester.Form1' does not implement interface member 'SWPStandards.ISWPDisplayMessage.DisplayMessage(st ring)'. 'BRBWinTester.Form1.DisplayMessage(string)' is either static, not public,
or has the wrong return type. Why doesn't it generate the same message for the other method? Any assistance would be appreciated.
Malek,
Thanks for you quick response. Unfortunately that is not the issue.
Changing method drfinition to
public void DisplayMessage(string message)
{
DisplayMessage(message,SWP.Const.NoPopUP);
}
generates the same error.
Ben
"Malek" <ke****@arrabeta.com> wrote in message
news:ee****************@TK2MSFTNGP09.phx.gbl... in your code, in the class implementing the interface, the first method is public, the second is not ... the problem is not on FQN for the methods,
but ob the modifier ...
an interface only lists public methods. by default, members of a class are protected.
"Ben R. Bolton" <ns****@xbridgesystems.com> wrote in message news:O8****************@TK2MSFTNGP09.phx.gbl... I have two projects each with a different namespace. The first defines
an interface with two methods. namespace SWPStandards
{
public interface ISWPDisplayMessage
{
void DisplayMessage(string message);
void DisplayMessage(string message, bool popUp);
} } the second implements the interface. namespace BRBWinTester
{
public class Form1 : System.Windows.Forms.Form,ISWPDisplayMessage,ISWPH andleException
{
..
public void DisplayMessage(string message, bool popUp)
{
statusBar1.Text = message;
if (popUp)
MessageBox.Show(message);
} void DisplayMessage(string message)
{
DisplayMessage(message,SWP.Const.NoPopUP);
} }
} I have implemented the two required methods one both without qualifying the method with SWPStandards.ISWPDisplayMessage. Why does the compiler generate the following exception?
'BRBWinTester.Form1' does not implement interface member 'SWPStandards.ISWPDisplayMessage.DisplayMessage(st ring)'. 'BRBWinTester.Form1.DisplayMessage(string)' is either static, not
public, or has the wrong return type. Why doesn't it generate the same message for the other method? Any assistance would be appreciated.
compiles fine when I try it ... did you close and reopen VS ?
"Ben R. Bolton" <ns****@xbridgesystems.com> wrote in message
news:ud**************@TK2MSFTNGP10.phx.gbl... Malek, Thanks for you quick response. Unfortunately that is not the issue. Changing method drfinition to
public void DisplayMessage(string message)
{
DisplayMessage(message,SWP.Const.NoPopUP);
} generates the same error.
Ben
"Malek" <ke****@arrabeta.com> wrote in message news:ee****************@TK2MSFTNGP09.phx.gbl... in your code, in the class implementing the interface, the first method
is public, the second is not ... the problem is not on FQN for the methods, but ob the modifier ...
an interface only lists public methods. by default, members of a class are protected.
"Ben R. Bolton" <ns****@xbridgesystems.com> wrote in message news:O8****************@TK2MSFTNGP09.phx.gbl... I have two projects each with a different namespace. The first
defines an interface with two methods. namespace SWPStandards
{
public interface ISWPDisplayMessage
{
void DisplayMessage(string message);
void DisplayMessage(string message, bool popUp);
} } the second implements the interface. namespace BRBWinTester
{
public class Form1 : System.Windows.Forms.Form,ISWPDisplayMessage,ISWPH andleException
{
..
public void DisplayMessage(string message, bool popUp)
{
statusBar1.Text = message;
if (popUp)
MessageBox.Show(message);
} void DisplayMessage(string message)
{
DisplayMessage(message,SWP.Const.NoPopUP);
} }
} I have implemented the two required methods one both without
qualifying the method with SWPStandards.ISWPDisplayMessage. Why does the compiler generate the following exception?
'BRBWinTester.Form1' does not implement interface member 'SWPStandards.ISWPDisplayMessage.DisplayMessage(st ring)'. 'BRBWinTester.Form1.DisplayMessage(string)' is either static, not public, or has the wrong return type. Why doesn't it generate the same message for the other method? Any assistance would be appreciated.
Makek,
Well closing and reopening the IDE solved the problem (grumble grumble)..
Thanks for you help.
Ben
"Malek" <ke****@arrabeta.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... compiles fine when I try it ... did you close and reopen VS ?
"Ben R. Bolton" <ns****@xbridgesystems.com> wrote in message news:ud**************@TK2MSFTNGP10.phx.gbl... Malek, Thanks for you quick response. Unfortunately that is not the issue. Changing method drfinition to
public void DisplayMessage(string message)
{
DisplayMessage(message,SWP.Const.NoPopUP);
} generates the same error.
Ben
"Malek" <ke****@arrabeta.com> wrote in message news:ee****************@TK2MSFTNGP09.phx.gbl... in your code, in the class implementing the interface, the first
method is public, the second is not ... the problem is not on FQN for the
methods, but ob the modifier ...
an interface only lists public methods. by default, members of a class are protected.
"Ben R. Bolton" <ns****@xbridgesystems.com> wrote in message news:O8****************@TK2MSFTNGP09.phx.gbl... > I have two projects each with a different namespace. The first defines an > interface with two methods. > > > > namespace SWPStandards > > { > > public interface ISWPDisplayMessage > > { > > void DisplayMessage(string message); > > void DisplayMessage(string message, bool popUp); > > } > > > > } > > > > the second implements the interface. > > > > namespace BRBWinTester > > { > > public class Form1 : > System.Windows.Forms.Form,ISWPDisplayMessage,ISWPH andleException > > { > > .. > > public void DisplayMessage(string message, bool popUp) > > { > > statusBar1.Text = message; > > if (popUp) > > MessageBox.Show(message); > > } > > > > void DisplayMessage(string message) > > { > > DisplayMessage(message,SWP.Const.NoPopUP); > > } > > > > } > > } > > > > I have implemented the two required methods one both without qualifying the > method with SWPStandards.ISWPDisplayMessage. Why does the compiler generate > the following exception? > > > > > > 'BRBWinTester.Form1' does not implement interface member > 'SWPStandards.ISWPDisplayMessage.DisplayMessage(st ring)'. > 'BRBWinTester.Form1.DisplayMessage(string)' is either static, not
public, or > has the wrong return type. > > > > Why doesn't it generate the same message for the other method? > > > > Any assistance would be appreciated. > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jeff Louie |
last post by:
Well I wonder if my old brain can handle threading. Dose this code look
reasonable.
Regards,
Jeff
using System;
using System.Diagnostics;
using System.IO;
using System.Threading;
|
by: dhnriverside |
last post by:
Hi peeps
Ok, so I thought I'd have a go at making a console app in VS2k5... I haven't
written any windows apps for years, let alone dos apps (been web programming)
and I've hit a dumb error...
...
|
by: SStory |
last post by:
Here is the situation.
I want to display Icons, Type of file etc from a file extension.
Upon initial program load I may only need icons for certain files. But
other operations will require...
|
by: pbd22 |
last post by:
hi.
i am having probs understanding how to grab a file being uploaded from
a remote client. i am using hidden input fields for upload such as:
<input id="my_file_element" type="file"...
|
by: gunimpi |
last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431
********************************************************
VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help
wanted...
|
by: Andrew Taylor |
last post by:
Hi,
I've been using PHP for a long time, I have designed and developed a
number of mid-range systems. I've always used a procedural approach. I
fully understand the concept of OO, I know all the...
|
by: igor.kulkin |
last post by:
References is a relatively basic feature of C++ language.
It might be a good thing to think of references as aliases to the
variables.
However it's good to think of references this way when you...
|
by: sajin |
last post by:
Hi All..
We are using VB .Net 2005 for implementing an API. API needs to
generate events. For this client wants us to use Windows Callback
(delegate implementation). The intention of using...
|
by: akshaycjoshi |
last post by:
I am reading a book which says
Even though unboxed value types don't have a type object pointer, you can still call virtual
methods (such as Equals, GetHashCode, or ToString) inherited or...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |