VB.NET Programming. Intermediate Lesson 4. Built in Functions

preview_player
Показать описание
This is the fourth in a series of computer science video tutorials for intermediate Visual Basic programmers who have completed the beginner’s series of video tutorials or are already familiar with the VB.NET syntax for the fundamental programming constructs. In this lesson you will learn about a number of built in functions that come with VB.NET. You will see how a function can be called, either by assigning the function’s return value to a variable, or by incorporating the function call in the condition part of an if statement. You will also how multiple functions can be called at once by means of nested function calls. It is important to understand how built in functions can be called before attempting to write your own functions. You will meet several different built in functions in this video; some for handling strings, some for numbers and other for performing data type conversions.
Chapters:
00:00 Introduction
00:28 The Len Function
01:37 The Asc Function
02:09 The Chr Function
02:34 The IsNumeric Function
03:42 The CDec Function
04:23 The CType Function
06:30 The Format Function
07:28 The UCase Function
08:02 The LCase Function
08:15 The Mid Function
08:37 The Strings.Right Function
09:04 The Strings.Replace Function
09:33 The InStr Function
10:05 The Math.Ceiling Function
10:42 The Math.Floor Function
10:57 The CInt Function
11:34 The Math.Round Function
11:56 The Math.Pi Function
12:12 The Now Function
12:33 The InputBox Function
13:20 The MsgBox Function
14:35 The structure of a function call and the return value
15:32 Calling functions in an If statement
16:28 Nesting function calls
17:19 Generate a random integer with the Rnd Function
Рекомендации по теме
Комментарии
Автор

I came from you flip-flop series videos just to say thank you for your work. It is very much appreciated, even your work from 4-6 years ago. My professor is an idiot, he doesn't understand that learning requires time and thoroughness. He uses "independent learning" as a way to avoid teaching certain topics. Thank you for patching the holes in my education, free of charge.

MrXenon-hnju
Автор

Very powerful learning experience with your vids. Lot's of notes again. Amazes me how you can next built in Functions. Time to make a sandwich and get to # 5....Thanks so much....JT

jtlunsford
Автор

Thanks. Great tutorial. But I can see that you dragged the form plenty of times to show the code and form at the same time. You can either set the form's start position property to center of the screen or programmatically set the position wherever you want.
If an expression returns a boolean value, you don't need to use "= Flase" or "=True" after an If statement. Just use "If IsNumeric(blablah) Then DothisJob". That's all.

kcvinu
Автор

Can you start working back on your Python Programming Playlist too...? Your work is commendable...!

suvigyabasnotra
Автор

Perfect! I was just working on some code using the Rnd() function and had some trouble. This helped me out as I didn't know about the Math tagline. I was trying random from 1 to 6 but using CInt() I was getting values 1 thru 7. A question, I know you didn't mention it here but should Randomize() be used prior to each instance of Rnd(), once at the form level or would it work placing it at the global level?

kevinerose
Автор

Love it!
Also it would be so nice if you could make videos on 'Software Development' & 'Artificial Intelligence' CIE AS Level 9618

shimaekram
Автор

In the assignment statement i = CInt(Math.Ceiling(Rnd() *6)), why are you using Cint () to make sure the expression evaluates to an integer in (1...6) when the expression Math.Ceiling(Rnd() *6) evaluates to an integer in (1...6), "...Visual Basic Rnd() function, that returns a floating-point value between 0.0 and 1.0." I spent some time trying to figure this out.

anthonynorton
Автор

hi. Can you help me to understand how to use NumberFormatInfo to replace "." with ", " tha is in a variable? Fo example
Dim a As String : a = "25.3"
Dim b As Decimal
b = CDec(a)
MsgBox(b)
I'll get a mistake. Because the separator of my system is ", " Thank you

kabukijoe