
27/05/2005, 14:15
|
 | | | Fecha de Ingreso: noviembre-2004
Mensajes: 55
Antigüedad: 20 años, 3 meses Puntos: 0 | |
crear arreglo  Hola a todos necesito de su ayuda estoy aprendiendo a hacer servicios web y haciendo ejercicios me encontre con un problema tengo este codigo que les puse abajo y cuando lo quiero ejecutar me arroja un error y quisiera saber si me pueden ayudar a corregir ese error la linea en donde me arroja el error esta en el webmethod con la funcion vercontacto que es del tipo contacto y es en el return que me arroja el error return y el error es : Demasiados argumentos para 'Public Sub New()'., ojala me puedan ayudar de antemano grax  . Código PHP: Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
<WebService(Namespace:="http://tempuri.org/webservice/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
Public Class Ojala
Inherits System.Web.Services.WebService
Public Arreglo As New Contacto
Public Sub Ojala()
End Sub
<WebMethod()> _
Public Function Suma(ByVal a As Integer, ByVal b As Integer) As Integer
Return a + b
End Function
<WebMethod()> _
Public Function vercontacto() As Contacto()
Return New Contacto() {New Contacto("Alexis Reátegui", "[email protected]", "5552266"), New Contacto("Jorge Oblitas", "[email protected]", "4444466"), New Contacto("Sergio Victorio", "[email protected]", "3333366"), New Contacto("Guino Henostroza", "[email protected]", "4564433"), New Contacto("Daniel Seara", "[email protected]", "9987667")}
End Function
End Class
Public Class Contacto
Inherits System.Web.Services.WebService
Public Nombre As String
Public Email As String
Public Telefono As String
Public Sub Contacto()
End Sub
Public Sub Contacto(ByVal nombre As String, ByVal email As String, ByVal fono As String)
nombre = nombre
email = email
Telefono = fono
End Sub
End Class
__________________ No abras los labios si no estás seguro de lo que vas a decir, es más hermoso que el silencio. |