Exception Handling | C# | Tutorial 24
Vložit
- čas přidán 24. 06. 2024
- Source Code - www.giraffeacademy.com/program... This video is one in a series of videos where we'll be looking at programming in C#. The course is designed for new programmers, and will introduce common programming topics using the C# language.
Throughout the course we'll be looking at various topics including variables, arrays, getting user input, loops, conditionals, object orientation and much more.
This series deserves so many more views than this!
Yep
yes
Clear and straight to the point!
Even non-programmers can understand this. Thank you so much!!
well, if you' re learning about how to programming ,then it is also mean that you're already programmer isn't? xD
Straight, informative and to the point. No BS exception caught.
Love your tutorials.
I wish you were my professor for my entire programming and web-designing studies.
You are a mentor to a fledgling programmer such as myself. Thank you for making these concepts easy to digest!
Thank you, Mike! I understand the topic well and I answer my exercises correctly. I can pass my OOP subject already!!
Thank you so much man.. Finally i understand this ...... keep going man
i was looking for this, and no one could give a straight answer like you!
This was awesome, Mike!
Man I'm writing Programming tomorrow and this has made me feel so much at at ease about Exception Handling
2:55 my guy said illegal hahaha.. you just gained a new sub man
Thanks for this very useful and simplified explanation. Really like the way you easily explain and present something. :)
The best tutorial video i have seen yet
every since college ive just been listening to your video and its so simple to understand unlike those other C# video lol
Everytime I see this guy, I can tell for sure that I will learn something. Greath thanks!
Hi! I'm studying for my finals and your videos are really helpful, thank you!
far better than my lecture! Thanks Man
Hi Mike! I've been looking for a clean explanation of try-catch block and this one was THE BEST so far!!! Thanks a LOT!!! Any chance you can add an explanation about the throw keyword? If there already is, please direct me to it. Also, is there any particular order when laying out catch blocks for multiple exceptions?
Thanks Mike for explaining so clearly exception
Thanks mike, you have just got yourself a new subscriber
thanks man, you are great, explained in first 60 sec all I was trying to understand about exceptions. Like!
I FINALLY UNDERSTAND! thank you so much :')
"That's illegal!" LOL that made me laugh. Thank you for this video I have an assignment due tonight and this helped me a lot.
Very nice Mike! Thank you!
OMG, man! you throw me some information that is so much useful to me and now I don't have to plan to watch a complete C# intermadiate/advanced tutorial. ( mean that part that you can catch a specific exception type and to something with that, that is like if statements for exceptions. )
Tnx for that...
I do wonder how old are you? This dude seems to be some super programmer. I just learn to program in swedish and my school gives me swedish sites to follow.
But after I found this dudes videos im in here every day to learn. This should be used by all schools in Programming.
your videos are really great, watching your videos made me understand c sharp better✊✊
straight to the point and very clear and i understood it very well 👍
very clear to unerstand! thanks
This 10 min vid helped me more than the book i was reading. Thanks for the help man
What were you reading? So I don't buy it lol
Your way of teaching is great thank you so much
dude now i know how to find bugs and errors easily thank you so much❤️❤️
EXACTLY WHAT I NEEDED THANK YOU
Watching this in 2021. Absolutely wonderful explanation!!!
Wow!
Amazing!
I asked for a cake, I got a whole supermarket.
Thank you for the video.
super clear and helpful, thank you!
Great explanation! Thank you so much
Really nice video! Thumbs up!
awesome, man, thanks!
Really helped me out tonight, ty
great explaniation bro tnx alot
Brilliant video!
Loved it!
This was so easy to understand even though im am austrian.....great explanation
I'm a bit late, but king, for this turorial, thank you very much!
I love you Man, You are a great teacher ❤️💛💚
I really love your videos! Im currently taking programming on a highschool level, and my teacher has theese videos, they suck! this video would probobly, not gonna lie, be 40min long! becouse he types with one finger, does misprints and talk so slow. So having theese to look at insted is so good! Thanks!
i do love your video ..
This was exceptional
ty my bro helped me a ton
Well explained, thank you 🙂 👍
this is what i love and what i went good teaching style
Great explanation. Thank you
this video is very clearly, thank you
Great video man
Great work
Thank You!
Perfect! Thanks!
Helped me understand it and use it Thx
Thank you teacher!
you are awesome thank you for the video !!
Bro. So good.
thanks this was well explained
Thank you man
Thank you for this video
Thank you!
excelent!
Thank You
First off the video was very informative and easy to understand....but....
I still don't understand the point of handling exceptions in the way you describe. exception handling takes up a lot more time than just checking for the errors the normal way. it would be more efficient just to check to see if the second value is a zero or a letter before preforming the code and then let the user know the mistake he or she made. In this particular case I could see possibly using a general exception to catch an error that I may not have thought of; then have the exception send a message telling where exactly the problem occured for trouble shooting purposes.
Could you give an example of using exception handling when normal error checking would not be able to handle the same problem? (other than using a catch-all general exception as I described earlier.)
Thank you so much
Thank you bro
Thank you
Good tutorial
Truly wish you're my teacher
Thanks 👌👍
This paired with the goto function works amazingly. i wish we had goto in python
kowai
@@thegoodkidboy7726 ?
@@rsk6929 people don't like goto very much
@@thegoodkidboy7726 ok, why
Thanks sir
How to catch an exception in an a, b, c, and d input only? How to catch numbers and texts such as w,q, t or r
But what about letting the user re-enter the values once again? I did miss that part. Where was it? After the exception was shown.
thanks!
nice and neat
thank you
just wanna say it's great and simple
kudos man!!
Thanks
let's say you enter a number and a letter how can throw an exception then make the code loop back to the beginning so you can try again without ending the program?
Thanks bruh
Mike! Come back!
hi do you have a video for C# System.ArithmeticException?
Super
What is the difference between Write and WriteLine?
thnku
Tx
i enjoyed it , so i am leaving a comment XD
Can someone explain what the e represents? Is it a variable? Does it have to be the letter e or could it be any other letter? Not sure what purpose it serves in the code exactly
"e" is an object of type Exception or any other one of the types that were in the catch block. Basically, it has all the error information inside of it, such as an error message (e.Message) or the current stack trace (e.Stacktrace). It could have been called any other name, but as convention it usually is called "e" or "ex"
same with if else statement?
I want the program to ask again for the user's input after the error message prints out on the catch. How can you do that?
You can make a bool variable named something like "response" that starts off FALSE.
Then, a do-while loop that contains your try-catch which contains your question and input prompts. It will loop while(response = false)
If everything goes well and dandy and the user has correct inputs... then the last line of code after your prompts is response = true;
and the do while condition will fail and exit the loop.
But if the user enters something that breaks the code, then the exception is caught and response is never set to true. So the do-while will keep asking the question. Until the user answers it right.
bool response = false;
do{
try{
// Your Questions and Inputs
response = true;
}catch(Exception e)
// Whatever you want to do with your exception
}
}while(response == false)
@@mikellwilliams6095 Bless you! This is exactly what I came here for!
How can i handle exceptions globally in console applications? Please help
Auto sub
Hello Mike How Are You Bro ?
one like is not enough!!!!!!!!!!!!