Thank you so much for this quick but informative video! I struggle a lot in learning C# and your video make it so much easier for me to learn !!!!! You are amazing and thanks again !!!!
Hi Derek, the way you teach is straightforward and awesome even for experienced developers like me. I subscribed you and started to review all my knowledge by help of your fantastic videos. Thanks a lot and best wishes for you.
Derek, just want to ask a question in 3:30 Console.WriteLine("! true = " + (!true)); *Output: ! true = False* //because the ! symbol is put in front of the (true) Console.WriteLine(!false); *Output: True* Console.WriteLine(false); *Output: false* Console.WriteLine(true); *Output: True* Did I get it correct?
Some important tips is that, never use catch(Exception) because will prevent your program from closing if you try to stop it by command/keyboard. It's a pretty specific had to detect error, and those are the worst lol
Thanks a lot for this series. I'm doing it under Linux with Visual Studio Code, compiling with "dotnet run". Works well :) I heard a lot of good things of this language, so finally I decided to try it. Your videos help a lot.
First video from you aaaaannnnd I immediately searched about you on udemy. I hope you will a release a c# course there. You know why? Because you are a unique teacher who diserves a lot. Thanks
Thank you for the nice compliment :) I plan on sticking with Python this year on Udemy. I want to make sure everyone that supported me gets about 250 videos to show how much I appreciate them
Question: While Loops Can I create a while loop that is just: While(true) { //do stuff if(exit is typed) WhileCondition = False } Now I'm not asking if I can change a variable to false, I mean literally, put true in the while condition, and directly change the While loops condition to false?
Hi Derek, these are really great tutorials, can I just say that at about 7:30 your Goto statement is not skipped and always processed regardless of what Age is set to ... (I'm a C programmer learning C#).
quick and smooth, as always. from Derek! even if I know these stuff, it is always awesome to hear from you too! please cover some advanced topics of C# as well! :)
Hi Everyone, Thank you Derek for this fabulous C# source. I would like to learn how to work with form application like creating a calculator. I am not sure which of your videos is appropriate to address it. Could anyone let me know which tutorial part should I watch? Thank you again.
Hi Derek, your doing best videos I learned a lot from them. I have such question - is it possible to go even deeper to present some kind of mathematical examples ? E.g. using matrixes for the purpose of programming, some kind of functions (I mean math functions), equations, etc. ? Because I value myself as lower class programmer and I couldnt pass math exams because I didnt see any purpose of matrixes because even teachers cannot explain you how it works in real life. My former class mate is programmer but doing 3D modeling via matrixes, math function, which I cannot do because I dont understand those things.
I'll need to do a lot of math once I start covering how to make games. As you said though I'll have to get into 3D before I can properly cover the use for matrixes and such. This whole year will be dedicated to games and I'll get there eventually. Sorry for the wait
when i make random no game the code is here Random rand = new Random(); int SecretNum = rand.Next(1, 11); int GuessedNum = 0; do { Console.WriteLine(SecretNum); Console.Write("enter number between 1 & 10 : "); GuessedNum = Convert.ToInt32(Console.ReadLine()); } while (SecretNum != GuessedNum); the message popped that format exception was unhandledAn unhandled exception of type 'System.FormatException' occurred in mscorlib.dll Additional information: Input string was not in a correct format.
Hi, I just have a simple question, is there a reason that you would use: if (name.Equals(name2, StringComparison.Ordinal)) instead of: if (name == name2) Thanks.
I watched some of your C# tutorials and found out that you are always using static functions. Whats the reason behind that? Why its not private or public?
A static function is a function that belongs to the class. It is a utility function. Basically if it doesn’t represent a real world thing that that object would do I make it static.
Great Tutorial!! Love the way you teach! Derek, when you try to divide by zero, if you dont "throw" the exception, the system won't throw it automatically for you? Thanks!
make a video showing: how to prove or express that you are extraordinary man for a job. all the thing to avoid and all the thing to attain in the process form sending someone you CV (resume) to the Job interview. I AM WAITING...
Thank you :) Yes it is very sad that almost nobody watches the whole video :( I keep trying to make tutorials that keep people engaged, but I'm not sure if there is really any way to achieve much over a 15% retention
I'd say that a lot of people who are starting out programming take online courses these days, even though you can get the same information for free. I very much appreciate people who take the time to make these sorts of videos, so thank you.
Great tutorial, thanks Derek. Range switch statement is now available in C# using when keyword. docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/switch sample: int num = 129; switch (num) { case int n when (n < 50): Console.WriteLine($"{n} is less than 50"); break; case int n when (n = 50): Console.WriteLine($"{n} is beetween 50 and 100: {n}"); break; case int n when (n > 100): Console.WriteLine($"{n} is greather than 100"); break; }
Hello Mr. Banas. I was wondering, if you covered pyaudio? Because apparently, that is the only thing, which works on my windows 7, without showing an annoying media player pop up. (I'm trying to make an AI)
It's okay. I gave up that idea. I'm not sure, what I am going todo, I did a kik auto loggin but bluestacks bugs around. I'm idea less. Except I can figure out how to auto loggin to wifi on a raspberry pi
Hi! I was wondering, If I could convert all these lines in just one or 5. I want to do a input thing, like if I sa "Hello", it responds and says with a audio file "Hello" import pyaudio import wave chunk = 1024 wf = wave.open('C:\\Users\COMPUTER_NAME\Desktop/test.wav', 'rb') p = pyaudio.PyAudio() stream = p.open( format=p.get_format_from_width (wf.getsampwidth ()) , channels=wf.getnchannels () , rate=wf.getframerate () , output=True) data = wf.readframes(chunk) while data != '': stream.write(data) data = wf.readframes(chunk) stream.close() p.terminate()
I don't know if someone notice that, but: else if ((age > 7) && (age < 13)) else if ((age > 13) && (age < 19)) So, if my student have '13' || >=19 age, then he go to college. :D
Derek Banas amazing! You're actually the only one that provides such informative guides on programming that come with great examples. Many youtubers can learn from you! When are you planning to cover threading and inheritance?
Continue works the same as Continue in Python works. It skips the rest of the loop and jumps back to the beginning of the loop. Return is used to return from a function
The best programming channel of all times.... If Derek Banas changed my life from a little village in Africa.. He can do it too for you😀
Thank you for your kind compliment :) I'm very happy I was able to help.
I need African programmer and I was wondering if you can cast voodoo on this girl I like to fall in love with me?
@Danyell Nachman don't be evil
@Jasper Morgan stop spamming
I expecially loved the part on exception handling which comes well after the Convert part ! Thank you for this so consise and useful video
Oh wow you're churning these out quick. Much appreciated!
I'm doing my best. The next one will be up on Wednesday
Love his tutorials and the way he says 'Aaaannndd!'(and)
That's funny :) Thank you
Thank you so much for this quick but informative video! I struggle a lot in learning C# and your video make it so much easier for me to learn !!!!! You are amazing and thanks again !!!!
Hi Derek, the way you teach is straightforward and awesome even for experienced developers like me. I subscribed you and started to review all my knowledge by help of your fantastic videos. Thanks a lot and best wishes for you.
Thank you for the nice compliment :)
finally a tutorial with which i can transition from c++ to c#
Am still here. Enjoying learning
Derek, just want to ask a question in 3:30
Console.WriteLine("! true = " + (!true));
*Output: ! true = False* //because the ! symbol is put in front of the (true)
Console.WriteLine(!false);
*Output: True*
Console.WriteLine(false);
*Output: false*
Console.WriteLine(true);
*Output: True*
Did I get it correct?
! the opposite, if you write true and put it! will show false
Some important tips is that, never use catch(Exception) because will prevent your program from closing if you try to stop it by command/keyboard.
It's a pretty specific had to detect error, and those are the worst lol
Thanks a lot for this series. I'm doing it under Linux with Visual Studio Code, compiling with "dotnet run". Works well :) I heard a lot of good things of this language, so finally I decided to try it. Your videos help a lot.
Thank you for watching it :) I'm happy it is helping
It won't skip the code at 7:30, code under label OtherSchool will be executed for any case in switch statement.
Sorry for not explaining that better
First video from you aaaaannnnd I immediately searched about you on udemy. I hope you will a release a c# course there. You know why? Because you are a unique teacher who diserves a lot. Thanks
Thank you for the nice compliment :) I plan on sticking with Python this year on Udemy. I want to make sure everyone that supported me gets about 250 videos to show how much I appreciate them
Question: While Loops
Can I create a while loop that is just:
While(true)
{
//do stuff
if(exit is typed)
WhileCondition = False
}
Now I'm not asking if I can change a variable to false, I mean literally, put true in the while condition, and directly change the While loops condition to false?
You could use while like that, but try using break instead with a condition to jump out of the loop
the silly thing is, i already figured that out, but forgot that i figured that out while watching the video.
Really enjoyed the exception handling and the convert function, they were of platinum quality! 😉
Thank you very much :) That's funny
Think it's obvious now...somebody likes C#...well...thankfully it helps Me to use Unity better. Thanks!
I can't wait to start making Unity tutorials
so for the random number command if I want to generate numbers 1 through 3 do I use
Random p1 = new Random();
int c1 = p1.Next(1, 3);
The 1 is inclusive, and the 3 is EXCLUSIVE , so your c1 will contain only between 1 and 2
max respect for Derek, another great tutorial !!!
Thank you :) I do my best
Hi Derek, these are really great tutorials, can I just say that at about 7:30 your Goto statement is not skipped and always processed regardless of what Age is set to ... (I'm a C programmer learning C#).
Whoops sorry if there was an error. I'll be making an updated C# video with Maui in the next couple of weeks
@@derekbanas No problem, I'm really enjoying the videos and would recommend them to anyone wanting to learn C#
quick and smooth, as always. from Derek! even if I know these stuff, it is always awesome to hear from you too!
please cover some advanced topics of C# as well! :)
Thank you for the nice compliment :) I definitely will cover complex stuff soon
The Relational Operators song at 0:42 I feel could be used as material for a kids series on programming hahaha.
+Graham Regan that's funny 😂
C# Sesame Street 😂
Hi, great video. Why do you use the finally block? Isn't the same thing just using the WriteLine alone?
I'm really liking C# compared to other languages...I'm all in with C#, .NET and SQL
I agree 100%
Hi Everyone,
Thank you Derek for this fabulous C# source. I would like to learn how to work with form application like creating a calculator. I am not sure which of your videos is appropriate to address it. Could anyone let me know which tutorial part should I watch?
Thank you again.
I'm happy you liked it :) I make a calculator here th-cam.com/video/G-BRSwClK_4/w-d-xo.html
Question: the "Finally" block, is that considered like the default "try/catch" ?
Not really because it is always called
Love C# and love your channel!
Are you going to cover any kind of networking and database connections?
Thank you :) Yes most definitely
Great as always! Thanks! :)
BTW I'm very excited to know that you are planning on doing a Unity series!
Thank you :) As soon as I finish up with C# basics I'll move into making apps with Xamarin and then Unity
That's awesome! Looking forward to it. Keep it up bro!
Thanks Derek, I had a question, Why you have incremented 2 time i like i++ in a while loop? one in if condition and another at last:
Excellent! Thank your, Mr.Banas :)
I'm very happy to be of help :)
Hi Derek, your doing best videos I learned a lot from them. I have such question - is it possible to go even deeper to present some kind of mathematical examples ? E.g. using matrixes for the purpose of programming, some kind of functions (I mean math functions), equations, etc. ?
Because I value myself as lower class programmer and I couldnt pass math exams because I didnt see any purpose of matrixes because even teachers cannot explain you how it works in real life.
My former class mate is programmer but doing 3D modeling via matrixes, math function, which I cannot do because I dont understand those things.
I'll need to do a lot of math once I start covering how to make games. As you said though I'll have to get into 3D before I can properly cover the use for matrixes and such. This whole year will be dedicated to games and I'll get there eventually. Sorry for the wait
Dont apologize, you are doing great job ! :) and I cannot wait until I learn those things :)
when i make random no game
the code is here
Random rand = new Random();
int SecretNum = rand.Next(1, 11);
int GuessedNum = 0;
do
{
Console.WriteLine(SecretNum);
Console.Write("enter number between 1 & 10 : ");
GuessedNum = Convert.ToInt32(Console.ReadLine());
} while (SecretNum != GuessedNum);
the message popped that
format exception was unhandledAn unhandled
exception of type 'System.FormatException' occurred in mscorlib.dll
Additional information: Input string was not in a correct format.
Can you do Cocos# for cross platform game development after this? It would make sense if you plan on doing Xamarin too
Yes I'll be covering both
Derek, What is the difference between
StringComparison.Ordinal
and
StringComparison.OrdinalIgnoreCase.
The second ignores the case meaning a and A are the same
Platinum!
Hey Derek! Appreciating your hard work as always, Will you be doing a tutorial on JavaCC anytime soon?
Thank you :) Sorry, but I'll be focusing on C#, cross platform apps and game for a while
how to create a case with multiple value?
it will be tiring to put a case for every value
Hi, I just have a simple question, is there a reason that you would use:
if (name.Equals(name2, StringComparison.Ordinal))
instead of:
if (name == name2)
Thanks.
In Java this is a big no no, but you are indeed correct that either will work in C# as long as both are strings
OK thanks!
x2 speed is out of this world
I watched some of your C# tutorials and found out that you are always using static functions. Whats the reason behind that?
Why its not private or public?
A static function is a function that belongs to the class. It is a utility function. Basically if it doesn’t represent a real world thing that that object would do I make it static.
@@derekbanas okay. Thanks for explaination.
Great Tutorial!! Love the way you teach!
Derek, when you try to divide by zero, if you dont "throw" the exception, the system won't throw it automatically for you?
Thanks!
Thank you :) Some languages think dividing by zero is ok
Hey Derek you might not believe this but I was going to ask you if you could make a tut on "Exception Handling"...too scary man! :
I'll be doing more with Exception Handling. This was just the first taste
make a video showing: how to prove or express that you are extraordinary man for a job. all the thing to avoid and all the thing to attain in the process form sending someone you CV (resume) to the Job interview.
I AM WAITING...
Sales skills will help you get a job better then anything else and I have a sales tutorial here th-cam.com/play/PL61952EC6E585D073.html
i didn't watch the video yet just wanted to let you've earned my subscription on patreon for your great content and quick reply. :)
Thank you very much :) I greatly appreciate that.
Platinum
(It is a shame there aren't more of these comments)
Thank you :) Yes it is very sad that almost nobody watches the whole video :( I keep trying to make tutorials that keep people engaged, but I'm not sure if there is really any way to achieve much over a 15% retention
I'd say that a lot of people who are starting out programming take online courses these days, even though you can get the same information for free. I very much appreciate people who take the time to make these sorts of videos, so thank you.
What Platinum?
Great tutorial, thanks Derek.
Range switch statement is now available in C# using when keyword.
docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/switch
sample:
int num = 129;
switch (num)
{
case int n when (n < 50):
Console.WriteLine($"{n} is less than 50");
break;
case int n when (n = 50):
Console.WriteLine($"{n} is beetween 50 and 100: {n}");
break;
case int n when (n > 100):
Console.WriteLine($"{n} is greather than 100");
break;
}
Thank you for sharing :)
Hello Mr. Banas. I was wondering, if you covered pyaudio? Because apparently, that is the only thing, which works on my windows 7, without showing an annoying media player pop up. (I'm trying to make an AI)
Sorry, but I didn't cover it
It's okay. I gave up that idea. I'm not sure, what I am going todo, I did a kik auto loggin but bluestacks bugs around. I'm idea less. Except I can figure out how to auto loggin to wifi on a raspberry pi
Hi!
I was wondering, If I could convert all these lines in just one or 5. I want to do a input thing, like if I sa "Hello", it responds and says with a audio file "Hello"
import pyaudio
import wave
chunk = 1024
wf = wave.open('C:\\Users\COMPUTER_NAME\Desktop/test.wav', 'rb')
p = pyaudio.PyAudio()
stream = p.open(
format=p.get_format_from_width (wf.getsampwidth ()) ,
channels=wf.getnchannels () ,
rate=wf.getframerate () ,
output=True)
data = wf.readframes(chunk)
while data != '':
stream.write(data)
data = wf.readframes(chunk)
stream.close()
p.terminate()
Thank you for the video!
You're very welcome :)
Like the c# tutorials!! but when i code a game on unity its different then normal c#.net coding. why is that? (print instead of Console.WriteLine)
Thank you :) I'll cover all of the differences soon
Platinum! Wow, I must've been psychic when I said platinum last video.
Thank you for doing that :)
nice tutorial as always.
Thank you very much :)
Thank you sir !
You're very welcome :)
I don't know if someone notice that, but:
else if ((age > 7) && (age < 13))
else if ((age > 13) && (age < 19))
So, if my student have '13' || >=19 age, then he go to college. :D
Sorry about the typo :)
Will you be doing a postgres tutorial?
I'm working on it
Awesome
Thanks
Thank you :)
thank you
I'm happy to help :)
Can you make a serie on WPF programming? in c#
YEs that is coming
Derek Banas amazing! You're actually the only one that provides such informative guides on programming that come with great examples. Many youtubers can learn from you! When are you planning to cover threading and inheritance?
Re,re, this guy don't breathe!
I edit out all pauses :)
lol :O
lmao i rly thought u don't breathe ._,
Platinum.
I was wondering if the continue operator is the same as the return operator in Python.
Continue works the same as Continue in Python works. It skips the rest of the loop and jumps back to the beginning of the loop. Return is used to return from a function
thank you very much (y)
Thank you for watching :)
you welcome
wouldn't the first code cause kids less than 5 years of age being sent to college?
Sorry about the typo
You sound a lot like Sal from Khan Academy
Thank you for the compliment :) He was the reason I started making videos.
The one who disliked it, please, please tell me you are a programmer not a hater !
I don't worry about the dislikes. It is normally someone that wanted me to cover a different topic
Derek you play games?
Yes I love games. I just got a PS4 and love it!!!
By the way..."Platinum"...!
Thank you for doing that :)
Platinum!
Thank you :)
Star Platinum!
Thank you :)
age = 13;
"go to college"
Try age 13
Platinum
Thank you for watching the whole video :)
hello
Hello
cool video
Thank you :)
Kindergarten? Didn‘t know that it actually means the same like in german lol
Yes we stole that name from Germany
video games