Тёмный
No video :(

Async and await in C# example 

kudvenkat
Подписаться 832 тыс.
Просмотров 531 тыс.
50% 1

In this video we will discuss async and await keywords and their use with an example.
Text version of the video
csharp-video-tu...
Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our RU-vid channel. Hope you can help.
/ @aarvikitchen5572
Slides
csharp-video-tu...
All C# Text Articles
csharp-video-tu...
All C# Slides
csharp-video-tu...
All C# Videos
• c# tutorial for beginners
All Dot Net and SQL Server Tutorials in English
www.youtube.co...
All Dot Net and SQL Server Tutorials in Arabic
/ kudvenkatarabic

Опубликовано:

 

21 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 264   
@raqibul1000
@raqibul1000 7 лет назад
You taught me so many stuff that made me survive and stay safe at work, I really appreciate your effort, we need more great people like you.
@MichaelCGatesMusic
@MichaelCGatesMusic 7 лет назад
In 11 minutes, you've wasted zero time on nonsense... All intuitive and thorough without the bloat. Thanks! I never find myself saying "hurry up!" during your videos.
@chezchezchezchez
@chezchezchezchez 6 лет назад
MichaelCGatesMusic yup!
@madhufun
@madhufun 4 года назад
I disagree with you sorry. RU-vid provided beautiful play controls, you can use them for fast forward etc. Just think of all kind of audience.
@rahulj2167
@rahulj2167 4 года назад
@@madhufun You understood it wrongly.
@drdoomenator1
@drdoomenator1 7 лет назад
I am from Russia and I do not speak very well English, but I understand all that you say, thank you
@piasuddin3846
@piasuddin3846 5 лет назад
I am from Bangladesh. I'm Pias. This is my first comment on your video. Actually i have a question to you. Before asking I want to say you something from my heart. You are that person who is created by God's own hand. You can't imagine how great you are and how your every free video help a person to get a clear concept about their topic. Without your video it was impossible for me to learn SQL and C#. Thank you so much....God will be with you for forever. He will give you a large gift that you can't imagine. You are really a great one in this whole world. You are the real hero. You are such a teacher that i never ever seen in my whole life. Through your video i will also learn the rest of language that you teach. I will always remember you and your help. I have a great wish to see you in any way. If you don't mind could you give me your picture. it's my dream to see you. (Now question: I can't find a video on garbage collector in c# Could you help me please if there is a existence one..)
@kitohammond
@kitohammond 3 года назад
Well said.
@miquel2423
@miquel2423 3 года назад
It is everyones dream to see vendkat in real life.
@hchoi84
@hchoi84 3 года назад
He briefly mentioned it in Video 19: Intro to Classes. I think it's a very low level topic and should be looked into probably when working on a large scale project. Otherwise, the C# itself will do a nice job of cleaning things up. If anyone's interested in digging into the topic, google keywords like destructor, finalizers, IDisposable, using, and garbage collection. Don't forget to append C#.
@jakeharrison505
@jakeharrison505 6 лет назад
Thank you so much, I had an issue with my application in processing FTP, using async and await, and it died on me. You revived it. Thank you!
@ga7853
@ga7853 4 года назад
Mr.Venkat, you are the best instructor on the net and RU-vid, you have a special way of making easy simple, God Bless for all the help I got from your tutorials.
@zackisser2451
@zackisser2451 6 лет назад
Hello venkat , this is a really awesome explanation of the async construct . I have a question :) I was wondering why the text Processing please wait doesn't get displayed , the instruction displaying it get's executed before the long-running task is reached . Any explanation would be appreciated .
@PalashBansal
@PalashBansal 4 года назад
@@RandomPerson13 "we've told the computer to keep this method on "Pause" until CountCharacters() is done, but not to pause the application itself." - finally someone said this statement in words otherwise all tutorials tell everything advanced but this basic statement. Thanks :)
@bhavyar2986
@bhavyar2986 2 года назад
In the beginning of the video, we see 3 steps in the button-click handler method. 1.setting the Processing file message to label 2. Calls countCharacters method 3. Setting the count to label When this message was running synchronously initially, it should display 1 because 2 is where it's taking time. Why doesn't step1 get printed ?
@TheMetaright
@TheMetaright 2 года назад
This tutorial was much easier to understand than most of the others I was seeing. Thank you!
@zebcode
@zebcode 5 лет назад
I've not seen one of your videos for a while; and so forgot how good you are at knowledge transfer. I've tried teaching, it isn't easy, please keep it up because you're doing a great job.
@slippyC73
@slippyC73 6 лет назад
I learn much easier visually. Thanks a bunch, been awhile since I've programmed in C#. I had used multithreading in the past, but it has been 8 or so years. This gave me a quick way of using newer and easier techniques to accomplish what I was looking for.
@TravelWithDhami
@TravelWithDhami 4 года назад
I am an Environmental Engineer with no prior experience in coding I learned from videos like these on the internet now I am an experienced Software engineer, Thanks for the content like these, Thanks for your work.
@darknez09240
@darknez09240 5 лет назад
immediately subscribed, i am a noob fresh graduate in IT, and i have forgotten most programming concept, so i have a hard time to understand any guide or explanation on this async/await usage, but this video is so simple and clear to understand, thank you for making these videos, all of your videos explains clearly and simple
@abubakaribrahim2676
@abubakaribrahim2676 3 года назад
You're a great teacher Venkat, am confident writing c# now, i am one video away to completing the series :)
@Csharp-video-tutorialsBlogspot
@Csharp-video-tutorialsBlogspot 3 года назад
Wow....Thank you for letting us know Abubakar. Hope you enjoyed this course. Not sure if you had the time to check out the following video that explains how to become a full stack dot net developer. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-RiKcSDbGVXw.html
@mohamedkunle528
@mohamedkunle528 3 года назад
thank you so much mr venkat , you taught me the whole course , i will not forget u for the rest of my life, what a teacher, huge respect.
@kurbanqureshi2265
@kurbanqureshi2265 7 лет назад
Dear venkat you are genius, master of Microsoft technology thank you very much.... I am software developer because of you....
@jonathanvargasv2009
@jonathanvargasv2009 5 лет назад
Ten minutes are enough when you have a given to teach. Awesome explanation! Thanks a lot.
@trustingod0
@trustingod0 Год назад
You have explained the async await part, but what about the Task part. What exactly is happening and why is task of type Task ? Thanks
@gustavokuze
@gustavokuze 7 лет назад
Thank You so much for the explanation sir! If any of You guys are getting an error similar to "Task does not contain a definition for 'GetAwaiter' ", take a look at the .Net Target version of your project! It'll only work for 4.5 or newer.
@manuelillanes1635
@manuelillanes1635 4 года назад
Best video series ever, thank you so much I learned a lot from you.
@dfytq
@dfytq 3 года назад
Venkat, I have seen many many experienced developers making confusion between async/await, parralel task and multi threading. Can you distinguish between them and create a video.
@Csharp-video-tutorialsBlogspot
@Csharp-video-tutorialsBlogspot 3 года назад
Hey Zaman - Great Question. Sure, I will record and upload as soon as I can. Thank you for asking.
@prakashodhav4339
@prakashodhav4339 6 лет назад
By far the best training in c# on the net. Simple and concise.
@venkatpalllantla1302
@venkatpalllantla1302 7 лет назад
I am putting my head on this for a while to comprehend this topic. But You nailed it, which you do every time. You are real boon for all .NET developers as me.
@aaronarnold3107
@aaronarnold3107 7 лет назад
I am totally pumped that the C# tutorial saga continues!!!!
@TechnicalAkshay
@TechnicalAkshay 4 года назад
You are the father of teachers.
@AvinashReddy21
@AvinashReddy21 7 лет назад
You are the best in the teaching world Venkat.
@nadrojiskool
@nadrojiskool 5 лет назад
Wow, you actually talked about the reference when you started using a new namespace. Thumbs up for that.
@94D33M
@94D33M 5 лет назад
when?
@sandeepmishra2622
@sandeepmishra2622 7 лет назад
Really Awesome . Your videos are really amazing easy to learn. Please add some videos from Design Patterns .
@aaronarnold3107
@aaronarnold3107 7 лет назад
I second this. I'm not seeing any good resources for C# design patterns on RU-vid.
@ThePapercutsful
@ThePapercutsful 6 лет назад
I agree, we youtube learners would really appreciate a good design patterns tutorial.
@redarismail5777
@redarismail5777 7 лет назад
Thank you so much, You are a great person , You taught me so many stuff that made me survive and stay safe at work, I really appreciate your effort, we need more great people like you. Thank you again, one more knowledge is added
@poliovei
@poliovei 7 лет назад
Thank you for sharing your knowledge, I hope you are attempting to prepare something about ASP NET 5, it would be wonderful
@amanulla_zakir
@amanulla_zakir 3 года назад
This kind explanation makes everyone a masters in async and await concepts. Thanks so much Sir
@elliottk68va
@elliottk68va 4 года назад
Thank you! You just saved me a ton of head ache! Thank you so much!. 8)
@iamtipe
@iamtipe 3 года назад
I have been watching you videos since I was in school, I really learned a lot from you sir. Thank you
@Sea-qv4sd
@Sea-qv4sd 3 года назад
Thanks a ton for this video. Very concise and clear tutorial for beginners
@Csharp-video-tutorialsBlogspot
@Csharp-video-tutorialsBlogspot 3 года назад
Hello Steve - Thank you very much for the feedback. I have included all the C# tutorial videos, slides and text articles in sequence on the following page. Hope you will find it handy. www.pragimtech.com/courses/c-sharp-tutorial-for-beginners/
@Sea-qv4sd
@Sea-qv4sd 3 года назад
@@Csharp-video-tutorialsBlogspot thank you so much, excellent reference for me starting out with harder concepts
@AdhritMnz
@AdhritMnz 4 года назад
Your videos are very useful. Videos you make are simple, precise and informative. Please keep posting such videos.
@ga7853
@ga7853 5 лет назад
I think you are the best teacher on the net, and wish if you could start " XAMARIN " Course.
@kunalbudhiraja7761
@kunalbudhiraja7761 6 лет назад
Venkat Sir you have made our learning easier.Thank you so much for the videos.
@os-channel
@os-channel 3 года назад
Better than studying hours for hours in books and internet articles. Right on!
@Csharp-video-tutorialsBlogspot
@Csharp-video-tutorialsBlogspot 3 года назад
Thank you Oliver. Really glad you are finding our courses useful. The following video could be of help, if you are planning to become a full stack dot net web developer. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-RiKcSDbGVXw.html
@kachunwong8184
@kachunwong8184 4 года назад
Video from 10:31 going on, I feel the freezing / non reactive problem was completely solved! Thank you very much. 😃
@technosamurai9171
@technosamurai9171 6 лет назад
Wow I went from his 6th video to this and the audio quality has improved tremendously!! Great vids btw!!
@Nicetrycutiepie
@Nicetrycutiepie 5 лет назад
Thanks Venkat, detailed and straightforward.
@Sreenivas20064u
@Sreenivas20064u 6 лет назад
this is by far the best explanation I found for async and await. thank you
@ricklangston8895
@ricklangston8895 2 года назад
Excellent tutorial. I watched another one of your videos a while back. It was about 'IEnumerate' and it was a great tutorial as well. You're a good teacher.
@mistery4437
@mistery4437 7 лет назад
అద్భుతమైన వివరన. ధన్యవాదాలు అన్న.
@AmitTiwari-en5wm
@AmitTiwari-en5wm 7 лет назад
you are great venkar, your videos are very useful for every phase of development, as you can see there are lots of requirements of design patterns please explain it
@Deathlupus
@Deathlupus 6 лет назад
The best teacher in the world
@kgurunadh9
@kgurunadh9 7 лет назад
I am thankful to you for uploading your dot net videos , it is very useful to my prof career. thanks
@ronchennai
@ronchennai 7 лет назад
Thanks Venkat,,one question, can we add more methods to the same task as in multicast-Delegates ?
@usama57926
@usama57926 4 года назад
wow very nice explanation
@radhakrishnaraju9320
@radhakrishnaraju9320 4 года назад
Great explanation with example within 11 mins.. Thank you Venkat.
@Xaisoft
@Xaisoft 7 лет назад
Venkat, your videos are great. I love your teaching style.
@IntotheWildscape
@IntotheWildscape 4 года назад
what a great tutorial which teaches async and await in 12 minutes. thank you
@ganeshn9464
@ganeshn9464 2 года назад
Awesome Video and as always ... par excellence ! I had a doubt though ! In the first case (without the use of async and await) , why isn't the label displaying "Processing file... Please wait" ? It is before the CountCharacters() right ?
@Ceyx100
@Ceyx100 6 лет назад
Very simple and efficient examples and explanations. Keep up the excellent work !
@OmaralaaHEROMORA
@OmaralaaHEROMORA 7 лет назад
No Words can explain how did you do it so good in so good example, well done sir
@herbertrodriguez3717
@herbertrodriguez3717 6 лет назад
Good way to explain ! Looked his web site videos and tutorials are in descent price ! Definitely worth the price .
@arwahsapi
@arwahsapi 5 лет назад
I still remember back then in Framework 2.0 when Async/Await weren't even keywords in C#, You had to explicitly create delegates, callbacks etc in some verbose IAsyncResult, BeginInvoke() and EndInvoke() patterns and provide means to return to the main thread, so messy the code has become back then. Now async/await are doing great job dealing with that mess!
@mageshwarank9395
@mageshwarank9395 7 лет назад
Thank You So much Sir.Last Video I Requested this Concept Now this Concept Started once again thanks sir.Keep Continue ..................
@KarChunChua
@KarChunChua 7 лет назад
very good explanation and example, learn a lot from your videos. awesome example to compare with the thread. 👍
@Rizzo91
@Rizzo91 6 лет назад
Very clear. Very easy to understand. Such a great video!
@siddhu8558
@siddhu8558 Год назад
Hey kudvenkat, loved your practical explanation. I have a doubt, what if CountCharacters() method had a parameter type? How will we give those parameters in Task?
@abeer_nawaf_sul
@abeer_nawaf_sul 7 лет назад
finally, I understand them clearly! thank you
@AllmightC94
@AllmightC94 3 года назад
Best simple example i've found in all internet lol
@KiranReddysn
@KiranReddysn 5 лет назад
Thanks Venkat for all your videos.. I got a job after watching your videos :)
@technicalcrackedinterviews4392
Kiran N that’s nice
@diverspudph1310
@diverspudph1310 5 лет назад
Very, very helpful. You can really teach and explain very well!
@NiftyBytes
@NiftyBytes 3 года назад
Nice and simple, straight to the point thank you
@anujk633
@anujk633 5 лет назад
Why it didn't display "Processing File. Please Wait..." for the first time. It should display the "processing file" message and then the time consuming task and then the result?
@xmenxwk
@xmenxwk 4 года назад
the button press was called from UI thread, so until the entire method is finished, there wont be any update in UI.
@asutoshmoharana8483
@asutoshmoharana8483 6 лет назад
Great video Sir!! It's simple and comprehensive and the explanation is too good.
@cakdham4607
@cakdham4607 2 года назад
Your tutorial still awesome even today
@janezklun
@janezklun 7 лет назад
Greatly explained, thanks!
@sabatyagi4153
@sabatyagi4153 6 лет назад
i love the way u teach.......... great work...!!
@natomacc
@natomacc 7 лет назад
This channel is worth it, I'm gonna subscribe!
@MohanPatil_Software_Engineer
@MohanPatil_Software_Engineer 4 года назад
Very helpful and easy to understand..
@brunotdantas
@brunotdantas 4 года назад
Thanks Venkat AGAIN (first you taught me T-SQL) for your way of teaching =)
@durgeshpandey7255
@durgeshpandey7255 7 лет назад
How to Pass Parameter in function like as Task task = new Task(MyCalculation("MyPara1", "MyPara2")); task.Start(); but its not working...
@user-qj2xk1wl9x
@user-qj2xk1wl9x 7 лет назад
Is that you was looking for? Task task = new Task( ()=> MyCalculation("MyPara1", "MyPara2")); task.Start(); or Task task = new Task(delegate { return MyCalculation("MyPara1", "MyPara2");}); task.Start();
@shwetanadar1081
@shwetanadar1081 2 года назад
Venkat's teaching is the same as Kholi hitting a six even in difficult situations
@MuhammadAdeelAhmed
@MuhammadAdeelAhmed 5 лет назад
Hi venkat, can you please help me understand how to update the progressbar while reading large XML files. Also the application should be able to resize or move around like you shown in this video. Thanks
@KhalidAfridi1
@KhalidAfridi1 4 года назад
Thank you so much, I have a method with parameters and its throwing a Cross thread exception while using Async and await Action. when I pass the parameters in Action Tasks, it throwing another exception " can not convert from void to System.Action" Please advise
@kalpseditz9535
@kalpseditz9535 2 года назад
So clear explanation, thank you so much
@billtsou8071
@billtsou8071 3 года назад
Amazing Tutorial! This is what I'm looking for.
@gowthamsaba5451
@gowthamsaba5451 7 лет назад
Your videos are always great..your crystal clear explanation creates interest in all concepts you explain..Keep up the great work!!! It would be great if you upload a video series of c# Design pattern..Thank you!
@akshitvithlani
@akshitvithlani Год назад
Great video man! Life saver!!! 💯
@ckschumeister411
@ckschumeister411 7 лет назад
all your videos are helped me a lot
@md.jannatulnayem4328
@md.jannatulnayem4328 3 года назад
This have been really helpful...Thanks a lot ❤
@abhijitv
@abhijitv 5 лет назад
thanks the example works perfectly fine ! great video
@martenhc
@martenhc 7 лет назад
Looking forward for the next video!
@ymazalmazal1757
@ymazalmazal1757 5 лет назад
Really cool, thank you so much for sharing !
@vikasgarg2035
@vikasgarg2035 5 лет назад
You are extremely awesome. However, found your pace of speaking is little high.
@pujasuryakusumah832
@pujasuryakusumah832 4 месяца назад
question, if await finished, the task will stop automatically? and if i have 4 method with different load txt . should i create 4 task start?
@mdabuzar2130
@mdabuzar2130 4 года назад
Hi Venkat, hope you are doing great. Could you please help me on how to process thousands of records in c#. Each record call a service to get some other details based on record id. Currently I am using paralell.foreach and it process 10000 record in an hour. Please suggest me how can I improve performance by 50%.
@Danuary
@Danuary 3 года назад
Great material, Venkat, thanks a lot!!
@warsymphony
@warsymphony 6 лет назад
Great tutorial!
@wp-wisdom
@wp-wisdom 3 года назад
Perfect explanation👍👍
@elfyjohnson261
@elfyjohnson261 Год назад
Does the task.start() executes on a separate thread? Then the next line i.e lblCount.text is executed by which thread? The main thread? Need some clarification, please.
@arianitonline8748
@arianitonline8748 7 лет назад
Dear Mr. Venkat, can you please make some tutorials on design patterns!
@ezraephrem6791
@ezraephrem6791 4 года назад
best explanantion of Async
@eskandarrushdi5584
@eskandarrushdi5584 4 года назад
this guy is genius, Bro if you have full paid tutorials in udemy for building real projects let me know please
@StreamBits
@StreamBits 6 лет назад
Great Example - Simple and short
@pkavinash
@pkavinash 4 года назад
Beautifully explained
@sameerabrahim5988
@sameerabrahim5988 4 года назад
i am getting an error, An asynchronous operation cannot be started at this time. Asynchronous operations may only be started within an asynchronous handler or module. Any thoughts? thanks
Далее
c# wait for thread to finish without blocking
12:18
Просмотров 226 тыс.
That's NOT How Async And Await Works in .NET!
12:25
Просмотров 20 тыс.
8 await async mistakes that you SHOULD avoid in .NET
21:13
C# Async Await Mistakes | Part 1
10:19
Просмотров 33 тыс.
Forget Controllers and Minimal APIs in .NET!
14:07
Просмотров 65 тыс.
Liskov: The Liskov Substitution Principle
4:23
Просмотров 21 тыс.