VB.NET Tutorial 18 - Subs (Visual Basic 2008/2010)

preview_player
Показать описание
In this tutorial, we cover what a Sub is, how to create one and how to call one. Using a Sub is a way of storing code and then executing it with a few letters. Be sure to subscribe for the upcoming tutorial on ByVal and ByRef if you want to discover the full potential of Subs.

For more information, check out the website:
Рекомендации по теме
Комментарии
Автор

I have learned a lot from your tutorials man. much appreciation. For those who don't know you could also have typed, "me.givemessage()" and accomplished the same. just a different way of "calling" the sub

TDubKong
Автор

I am from Germany and i understood it nearly perfect, thumbs up!

TheMarcx
Автор

That's the best Tutorial, I've ever seen!!!

LINKINPARKBESTFAN
Автор

short and sweet. thanks for helping me review for my next programming class!

tigereighties
Автор

YES! :D GREAT MATE! For so long now, I used to store code in timers and ticked them when I wold like the code to execute. Now I am time free! :D

Olemassacre
Автор

You are the best teacher ever!
Don't know anything bad to say about it :P
You're great! :P

iLenkaa
Автор

that was much easyer to understand then the for loop thing i didnt get that one but i got the do while and do until one

thegamingruler
Автор

Hello Sir,

I have 1 questions when we write sub as Givemessage () ... why we need to call these parenthesis is it as function call or sub need this () paranthesis..

atuldeepu
Автор

this is when you use "GLOBAL VARIABLES" eg... at the top below the class name you put "private myvar as string = nothing"

private means you can you can use that variable anywhere inside the class

TheVideoVolcano
Автор

@Hydrogz It's genious! :D 1: You can store codeing for later on. 2: You can just call for the sub whenever you want to a whole bunch of codeing! :D

Olemassacre
Автор

thank you so much, this is going to be much useful. :)) you're awesome.

cathgao
Автор

thank you so much .. you are helping me a lot

totasalam
Автор

@SkitSophrenia uh? Sub are different then functions...Most of the time, unless if you use a sub that receive a ByRef parameters will never return a value. The sub will execute de code and thats it. A function will return a value to were it was called back in the code.

marckyeva
Автор

Hey, i have a couple of requests! :D
How to make and use Databases.
Creating and animating shapes.
login system

other then that i LOVE your tuts!

TheAndreLeNoir
Автор

You can use Call givemessage() or just givemessage()

robdauphinee
Автор

i haven't learned this with any VB stuff but in javascript a private can only be accessed from inside it's own code, and a public can be accessed by anything

AyyPeff
Автор

Whenever I do VB NOW I talk with a British Accent... But I like it cuz I have UR word repeated in my head...

VidShoe
Автор

what's the difference if i write

messagebox.show("blabla")
directly on the button1_click

rather than using subs blablablablbala
and in the end the result is the same ?

PregnantAndProud
Автор

what is sub? and what else can we do with sub?

blessing
Автор

Can you explain the differences between Public and Private subs?

PasswordHackerz