Visual Basic .NET » ASP.NET General Discussion
.NET Attribute for VB code -- bubberz --


Hello!

I'm pluggin' through some code in my AJAX professional book, which uses this AjaxPro.dll assembly, and need to know how to convert the following C code to VB:


public int Add(int firstNumber, int secondNumber)
{
return firstNumber + secondNumber
}

So far, I've got:
Public Function Add(ByVal firstNumber As Integer, ByVal secondNumber As Integer) As Integer
Return firstNumber + secondNumber End Function

where/how do I implement
in this VB function?

Thanks!

-- bubberz --


I'm trying this too, and it's not working:
Public Function Add(ByVal firstNumber As Integer, ByVal secondNumber As Integer) As Integer Implements AjaxPro.AjaxMethod()
Return firstNumber + secondNumber
End Function

-- bubberz --


Looks like it's this:
<AjaxPro.AjaxMethod()> _
Public Function Add(ByVal firstNumber As Integer, ByVal secondNumber As Integer) As Integer
Return firstNumber + secondNumber
End Function

Thanks!

[Submit Comment]Home