Visual Basic Tutorial - 13 - If Statement

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ม.ค. 2025

ความคิดเห็น • 53

  • @HippyGiraffe
    @HippyGiraffe 11 ปีที่แล้ว +39

    I was just notified of a reply to a comment I posted on one of the videos in this series about a year ago: the question's answer is was very obvious for me, reading it now.
    At this moment, 11 months later, I'm fluent in VB.NET and C#, and know my way around Java and C++.
    I'm only posting this comment to tell everyone out there to don't give up! I was there less than a year ago, with no programming knowledge whatsoever - now, I code whatever I want and am planning to start software engineering in uni.
    KEEP GOING! You'll get there - and it's so much fun!

  • @rmz1994
    @rmz1994 12 ปีที่แล้ว +2

    i studied other languages before this series and i gotta say
    I LOVE THE WAY SAM IS TEACHING US
    he is straight on point with what hes doing and i feel confident ima make it to the end satisfied

  • @G1nnix27
    @G1nnix27 7 ปีที่แล้ว +1

    You probably don't even read these anymore, but I would just like to point out that my teacher makes 25 minute videos over these same things and I still just don't get it when he does it. Your tutorials are short and right to the point, thank you. These videos are amazing

  • @JDMx607
    @JDMx607 12 ปีที่แล้ว

    Just would like to say thank you! I understand most of this stuff, but a few things were still new to me, and your videos, including this one, helped me.

  • @Prathamesh17.17
    @Prathamesh17.17 2 ปีที่แล้ว +1

    Sir I'm reallly really going to thank you .Your video is really going save me🙇🏻‍♂️ for my practical exam.Thank you so much sir.

  • @solorzanoronald1776
    @solorzanoronald1776 7 ปีที่แล้ว

    your awesome, best tutorials I have seen

  • @HS-dl6vl
    @HS-dl6vl ปีที่แล้ว

    Love you bro!
    Thanks for getting me clear about the topic
    ❤❤❤❤

  • @MasterMitch200
    @MasterMitch200 11 ปีที่แล้ว

    I like Bucky more, but Sam is good too. The reason I like Bucky more is because I watched more tutorials with Bucky in it and Bucky makes it fun to learn, but like you said, Sam is always straight on point, so I like both of them.

  • @magdangalaira9717
    @magdangalaira9717 3 ปีที่แล้ว

    Thanks for sharing your idea about that😊I hope you can make more videos😊

  • @HexPlays
    @HexPlays 13 ปีที่แล้ว

    @DOVARIRAMU when your coding it you can set the password to be whatever you want. the end result is that if you type it correctly youl get a conformation, and if you dont it will close. as long as the password you type into the console matches the one you coded it will work fine ;)

  • @mdjaberhossain7387
    @mdjaberhossain7387 4 ปีที่แล้ว

    Thanks a lot sir...These are most helpful for beginner

  • @azkymohamed123
    @azkymohamed123 8 ปีที่แล้ว

    just here to says thanks for the videos

  • @apoorvgoel490
    @apoorvgoel490 12 ปีที่แล้ว

    This guy rocks

  • @BunnehRealm
    @BunnehRealm 12 ปีที่แล้ว

    This isnt bucky, this is sam.

  • @Yuoruddo
    @Yuoruddo 13 ปีที่แล้ว

    Why does the single equal sign work here? Shouldn't you need a double equals?

  • @TheLousyProductions
    @TheLousyProductions 12 ปีที่แล้ว

    Because the If statements do not exist BEFORE he types his password, notice that we have typed the If statements only AFTER he types his password. I'm assuming that each Line of code is read one by one in the order they are typed and not read all at once.
    For it to work the way you are saying, I guess the If statements would have to come BEFORE everything else. Try it out.

  • @denizenofdarkness5030
    @denizenofdarkness5030 2 ปีที่แล้ว

    Hey, I tried doing conditional statements on visual basic using an online compiler. I did it exactly like how it should be done, but it's stil showing an error. Got any tips?

  • @Poofu
    @Poofu 13 ปีที่แล้ว

    is there any way to make it so if it is anything else it says something else?

  • @F_L_U_X
    @F_L_U_X 13 ปีที่แล้ว +3

    Gerald is not equal to Sam?! SINCE WHEN?!

  • @TheCrookHook
    @TheCrookHook 13 ปีที่แล้ว

    @DOVARIRAMU If you would have written sam123 and did "if password = "thenewboston" then it wouldn't have done anything because you need an "else" statement. The "else" statement is used if the condition you are veryfiing is false.
    ex:
    If password = "thenewboston" then
    console.writeline("Good pass")
    else
    console.writeline("Wrong pass")
    end

  • @TheCrookHook
    @TheCrookHook 13 ปีที่แล้ว

    @Yuoruddo I was also used to the double equals when comparing (in Java). In VB though, I guess it's only 1 equals to compare lol I didn't like that either XD

  • @zalmanpinuozman8250
    @zalmanpinuozman8250 6 ปีที่แล้ว

    Thank you for than teacher✔✔🇸🇴

  • @mrscurry99
    @mrscurry99 8 ปีที่แล้ว +3

    why do you only use console applications?

    • @ThesexyMrX
      @ThesexyMrX 8 ปีที่แล้ว +3

      i agree, i need some forms tuts

  • @rvinelle7142
    @rvinelle7142 9 ปีที่แล้ว

    hey how can i download visual studio is there link to it

  • @OptiGE
    @OptiGE 12 ปีที่แล้ว

    After you Write that your name is sam. Then Welcome Sam should pop up. Then AFTER that it should ask for your password... Why doesn't it work like that? Why does the Welcome Sam string wait until you have written the password to?

    • @Yotsuba090
      @Yotsuba090 8 ปีที่แล้ว

      I know this is old, but adding a comment here to show what you're talking about, because I was asking myself the same thing when going over this tutorial. Putting this here in case someone was curious what the code would look like if they come across this comment & ViD.
      Module Module1
      Sub Main()
      Console.WriteLine("What is your name?")
      Dim username As String = Console.ReadLine()
      If username = "Sam" Then
      Console.WriteLine("Welcome Sam!")
      End If
      Console.WriteLine()
      Console.WriteLine("What is your password?")
      Dim password As String = Console.ReadLine()
      Console.WriteLine()
      If password = "apples" Then
      Console.WriteLine("You have entered the correct password!")
      End If
      Console.ReadLine()
      End Sub
      End Module

  • @o0OMadMikeO0o
    @o0OMadMikeO0o 13 ปีที่แล้ว

    @onlivegamer You could have writte Console.WriteLine("Welcome" & username)
    and skip the first if statement but nevermind. I guess if was the objective of the vid xD

  • @rmz1994
    @rmz1994 12 ปีที่แล้ว

    thanks for that

  • @ivandrofly
    @ivandrofly 11 ปีที่แล้ว

    How to ignore the string comparing?!

  • @ChrisPTY507
    @ChrisPTY507 12 ปีที่แล้ว

    i dunno why u used end if after the "welcome sam" quote,that if statement is incomplete because you need an else to finish it,because basically is the name is not sam,the incomplete if will do nothing,just a waste of space...

  • @notserpmale03
    @notserpmale03 9 ปีที่แล้ว +1

    Private Sub forwardcontrol1_Click()
    If WebBrowser1.Visible = True (This part is giving me the error, it wont register as in if statment)
    WebBrowser1.Go Forward
    End Sub
    what is wrong with that. and no, (it isnt the go Forward part that has worked forever)

    • @retro2712
      @retro2712 7 ปีที่แล้ว

      and it needs to be If WebBrowser1.Visible = True then
      webbrowser1.go forward
      endif

  • @mohajeran
    @mohajeran 10 ปีที่แล้ว

    Hi Sam;
    I have an excel sheet that does some calculations. First, cell A1 needs to be initialized by a number (let’s say 1). Now cells A2 to A5 read the value of A1 and do some calculations. If one of cells A2 to A5 has a value between equal to 0, then value of cell A1 has reached its maximum, otherwise A1 should be increased by 1. Upon incrementing A1, I need to check again if one of the cells A2 to A5 hold a 0 value, if yes then A1 has reached its maximum value, otherwise A1 needs to be increased again by 1, and so on. I think this should be done by VB, but I am not sure how. Any feedback you can give me. ? thank you very much.

    • @mohajeran
      @mohajeran 10 ปีที่แล้ว

      I find the solution.!

  • @RAMUDOVARI
    @RAMUDOVARI 13 ปีที่แล้ว

    If I want to create my password is "sam123" then what is my result?

  • @sunehrraalamtorosa1101
    @sunehrraalamtorosa1101 7 ปีที่แล้ว

    Can you tell the pseudocode for this?????

  • @melek9048
    @melek9048 12 ปีที่แล้ว

    did you read 'The Witcher' or played the game?

  • @RahilWazirAli
    @RahilWazirAli 12 ปีที่แล้ว

    after 100 tutor's

  • @o0OMadMikeO0o
    @o0OMadMikeO0o 13 ปีที่แล้ว

    @JestTutorials Cool, Want a cookie now you fool?

  • @evaldaskowka
    @evaldaskowka 13 ปีที่แล้ว

    @Yuoruddo Different language buddy

  • @RahilWazirAli
    @RahilWazirAli 12 ปีที่แล้ว

    50 liker!!

  • @magoomba
    @magoomba 13 ปีที่แล้ว

    T. Dodge

  • @MrHolesVids
    @MrHolesVids 13 ปีที่แล้ว

    @gilbert4321 ?

  • @JacobBanerjee2821
    @JacobBanerjee2821 12 ปีที่แล้ว

    100st, seriously.

  • @ChrisPTY507
    @ChrisPTY507 12 ปีที่แล้ว

    I was born in mars......am i weird?

  • @kingzmasendeke3374
    @kingzmasendeke3374 4 ปีที่แล้ว

    anyone 2020

  • @morg4nevs713
    @morg4nevs713 4 ปีที่แล้ว

    ok

  • @bramvermeulen3447
    @bramvermeulen3447 11 ปีที่แล้ว

    0 dislikes

  • @pmackni
    @pmackni 11 ปีที่แล้ว

    0.o