1st, I hope you do know what a 'sub' is, if you don't, anyways its like a paragraph that includes codes to be executed when an event happens, as button.click event or mousehover event
a function is like a sub but returns a value, and does the same work of a variable, for example you can make a function for adding numbers:
private function Name_Of_Your_Function(Byval num1 as integer,byval num2 as integer) as integer
and now u made a function that dims 2 variables (num1, num2) and returns an integer (as integer)
now we type inside it:
dim num3 as integer
num1 + num2 = num3
return num3
notice the return cmd, u can also type: Name_Of_Your_Function = num3
Notice that we didnt dim the num3 in the function declaration ull know why later
now put 2 textboxs and a button and in the Sub of the button add:
dim frstnum, scndnum as integer
and assign them the textboxs input
now to call out function we right its name:
Name_Of_Your_Function()
now we put in the brackets the old num1 and num2,, but as whatever we want, so if we want to add 1 and 6 we do:
Name_Of_Your_Function(1, 6)
now we want to add variables frstnum and scndnum so we will do
Name_Of_Your_Function(frstnum, scndnum)
and now to get the result we'll get the value of the function, remember?
so we wil assign the value of that function to a new variable for us to use
dim answer as integer
answer = Name_Of_Your_Function
And then add a label and do label1.text = answer
and your done!
You successfully used a function
I hope you understood the consept, you can make functions return other things than integers tho, as strings and booleans
Nothing, as VB is now part of .Net. .Net contains following main languages: - C# - VB However, VB 6 was before .Net and was independent. dotnet is a framework that supports multiple languages and vb is one the language supported by dotnet.
totally there are 3 types C # Asp dot net Vb dot net
Vb(visual basic) is the language support by a .Net framework.we can use the vb as a windows application and web application and use the many application we can create.
Java
C#, vb, j#
common controls and its properties
job description of vb.net developer
There are many places one might find a tutorial for VB net. The most readily available resource would most likely be on the official brand website or from one's local library.
.net is technology in which we can design application as we wish and can write code in c# or vb anyone language
Str converts a number to a string.
It doesn't discuss.
There are ofcourse good books friend... Among them u can try "Programming in c#" by Oreily publications