Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

As opposed to a subroutine?

 

Function AddNumbers(a As Integer, b As Integer) As Integer
   return a + b;
End Function

Sub Main()
    Dim Result As Integer = AddNumbers(10, 100)
End Sub

 

At least that is what I think you are asking. You have 100 posts, it would be kind of hard to get that far if you meant functions in general.

Posted
In VB, a Sub(routine) is just that, a package of code that is run. A Function returns something. So I am not really sure what you want. It looks like you already solved your problem from the post.
  • Leaders
Posted (edited)

I recommend you look into a VB .Net tutorial.

[Edit]I mean to pick up syntax, not to learn how to program.[/edit]

Edited by snarfblam
[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...