Welcome to Dream.In.Code
Getting VB.NET Help is Easy!

Join 105,776 VB.NET Programmers for FREE! Ask your question and get quick answers from experts. There are 1,254 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Weird error

 
Reply to this topicStart new topic

Weird error

morris.andy
post 6 Jun, 2008 - 08:25 AM
Post #1


New D.I.C Head

*
Joined: 20 May, 2008
Posts: 3

Hi, I am currently struggling with this error while trying to build my service host. It works fine while there is only one function in there but as soon as I try to add another I get the error. any help would be greatly appreciated.

vb

[<ServiceContract()> _
Public Interface IDotNetFunServiceContract

<OperationContract()> _
Function AddNumbers(ByVal Number1 As Integer, ByVal Number2 As Integer) As Integer
<OperationContract()> _
Function Test(ByVal SideA As Double, ByVal SideB As Double) As Double
End Interface


vb

Public Class DotNetFunService
Implements IDotNetFunServiceContract[color=#FF0000]

Public Function AddNumbers(ByVal Number1 As Integer, ByVal Number2 As Integer) As Integer Implements IDotNetFunServiceContract.AddNumbers
Return (Number1 + Number2)
End Function

Public Function Test(ByVal SideA As Double, ByVal SideB As Double) As Double

End Function
End Class]


It's when I seem to try to add a new function. The error message I get in the problems panel is:

Class 'DotNetFunService' must implement 'Function Test(SideA As Double, SideB As Double) As Double for interface 'IDotNetFunServiceContract'.
User is offlineProfile CardPM

Go to the top of the page


Damage
post 6 Jun, 2008 - 03:48 PM
Post #2


D.I.C Head

**
Joined: 5 Jun, 2008
Posts: 170


My Contributions


umm this is a real shot in the dark but could it have something to do with the fact that test function doesn;t have a return statement?
User is online!Profile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/21/08 04:18PM

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month