James White

James White

  • NA
  • 1
  • 0

VB08 WebMethod Output question

Jan 28 2010 8:42 AM
Hey there I am having problems with a webmethod I'm trying to create. The webmethod works by taking information from the user and then outputs two different answers to an equation. The equation has two different versions a plus and a minus version with the aim to give two different answers. However, the webmethod code I have only outputs one answer and I was hoping someone could help me.

Here is the code

 <WebMethod(Description:="Works out the Equation Rule")> _
    Public Function Equation(ByVal x As Double, ByVal A As Double, ByVal B As Double) As Double
        Return (-(A) - Sqrt(A ^ 2 - (4 * x * B))) / (2 * x) And (-(A) + Sqrt(A ^ 2 - (4 * x * B))) / (2 * x)
    End Function

 
Thanks for your time
James