C# Out parameters Vs REF parameters

  Рет қаралды 287,115

.NET Interview Preparation videos

.NET Interview Preparation videos

Күн бұрын

Пікірлер: 182
@dnfvideo
@dnfvideo 3 жыл бұрын
Do not miss our Interview Question video series 30 Important C# Interview Questions : kzbin.info/www/bejne/eHzcn3h4hdacf68 25 Important ASP.NET Interview Questions : kzbin.info/www/bejne/ponQfpejf7p2Zsk 25 Angular Interview Questions : kzbin.info/www/bejne/Y5vIoKx6f6mmia8 5 MSBI Interview Questions : kzbin.info/www/bejne/a3abYmiXjaaqj7M
@torykidd7570
@torykidd7570 2 жыл бұрын
Six years later, you're still helping newbie programmers. Thank you.
@so_called_kabir_singh
@so_called_kabir_singh Ай бұрын
Bro here I'm 9 years later
@ankitmvp
@ankitmvp 3 жыл бұрын
Shiv sir is the best mentor. He is the only one who can explain the complex concepts with ease, even to Microsoft devs. 😊
@Lisa-uq4ty
@Lisa-uq4ty 6 жыл бұрын
You are the first person who explained this in a way I could understand. Thank you!
@BlueHat1
@BlueHat1 Жыл бұрын
Wow! That's honestly the perfect example, thank you so much!
@ivanubiamaia9475
@ivanubiamaia9475 7 жыл бұрын
Great tutorial. Now it is very clear the difference between ref and out for me. Thank you!
@alitalipakgun5535
@alitalipakgun5535 5 жыл бұрын
Wow described perfectly i have no question in my mind about differences between normal, out and ref paramaters after watching the video. Thx pal !
@WickedFlamezZ
@WickedFlamezZ 3 жыл бұрын
Really great video, others are 16minutes long but this tells you everything you need to know in 6.
@kiPROBRos
@kiPROBRos 3 жыл бұрын
Ovo je najbolji tutorijal u vezi Ref parametra.
@sasirekha9523
@sasirekha9523 Жыл бұрын
Sir no other articles explained in this correct and prompt way. either it is confusing or left unexplained. you are nailing to the point. hats off to you sir always.
@quaintnet103
@quaintnet103 9 жыл бұрын
I like all your videos! very informative.....Pls correct the dialog "by default the variables are passed by REF....." to by default the variables are passed by Value..." at 00.51
@basilio100
@basilio100 9 жыл бұрын
+Quaint Net I would say that PRIMITIVE types passed by value,....
@liubomirwm
@liubomirwm 7 жыл бұрын
Actually all types are passed by value, the difference is that primitive types contain their value in the stack and their stack variable (containing the value) is passed. So called reference types have a stack variable which contains not the value directly but the address to the heap (where the actual data is contained). When you pass a so called reference you pass the reference address by value.
@trenocio8541
@trenocio8541 5 жыл бұрын
@Taiwo Seiler As far as I know, it doesn't make any difference to add ref to a non primitive type
@akshaytalekar2880
@akshaytalekar2880 6 жыл бұрын
Ever Ever Simplest Explanation About REF OUT Keywords.
@DirePantsDim
@DirePantsDim Жыл бұрын
Eight years later, and still the best explanation on this topic. You sir, are awesome.
@rjbb0377
@rjbb0377 Жыл бұрын
Thank you so much! I have had such a hard time trying to understand this, but after listening to you it is so much more clear.
@satish6776
@satish6776 4 жыл бұрын
thank you so much!!! I watch many video but not clear this concept. clearly explained and easy example
@LucasofAppalachia
@LucasofAppalachia 8 жыл бұрын
Thank you! Very clear explanation with good examples.
@nandorbacso4625
@nandorbacso4625 4 жыл бұрын
It was a really good and well understandable video! Thanks, man!
@jakebwhite9253
@jakebwhite9253 3 жыл бұрын
Thank you! This cleared up the difference. I don’t understand when would someone use “out” though, it seems dangerous!
@niluniverse
@niluniverse 7 жыл бұрын
Absolute Explanation ! Thank You Very Much Shiv !
@SumitGupta-wr3jf
@SumitGupta-wr3jf 3 жыл бұрын
I think 10 time to watch more than 7-8 min videos but you explanation is so sorted even half and hour video i see cause i clears my doubt from top to bottom so i can remember easily....
@ronelperez2565
@ronelperez2565 7 жыл бұрын
Thank you. Simply explained but very understandeable.
@d_cl
@d_cl Жыл бұрын
The clearest explication I found! Thanks!
@CarlosRamirez-jh8yw
@CarlosRamirez-jh8yw 4 жыл бұрын
Best explanation yet! Thank you
@hagbard6880
@hagbard6880 6 жыл бұрын
This Video helped me a lot. Thank you.
@snowblind112
@snowblind112 3 жыл бұрын
Perfect explanation, I was totally lost before I found your video. Thank you!
@srinivasaraoyp3640
@srinivasaraoyp3640 5 жыл бұрын
Very nicely explained Sir. I enjoyed your video...Thank you....
@RahulGupta-jk9lb
@RahulGupta-jk9lb 3 жыл бұрын
I was confused for ref and out parameters. Now It is clear, thanks!
@vikramsharma4264
@vikramsharma4264 6 жыл бұрын
you are the best teacher !!
@suniljadhav589
@suniljadhav589 6 жыл бұрын
Nice explanation. Very easy to understand these type of concepts.
@tamaraimani5068
@tamaraimani5068 Жыл бұрын
I appreciate your way of presentation..
@glasgood9907
@glasgood9907 3 ай бұрын
Fantastic explanation, thank you so much 👍🏼
@leoc5473
@leoc5473 4 жыл бұрын
Incredibly helpful, thank you so much!
@jayadulshuvo5857
@jayadulshuvo5857 4 жыл бұрын
That was the easiest explanation of the topic. Thank you.
@MarcV_IndieGameDev
@MarcV_IndieGameDev 5 жыл бұрын
Thank you for the video, helped me out.. or should should I say, helped me ref'd
@Prishadubey88
@Prishadubey88 3 жыл бұрын
I'm really so impressed with the explanation. I have observed the pop up at 0.55 minutes time which puts the wrong statement for default . Could you please correct the same. Rest.... I'm a big fan of your every video. Happy Learning Sir.
@nishanthgmk3487
@nishanthgmk3487 3 жыл бұрын
The best explanation ever seen, no more doubts
@sery152
@sery152 5 жыл бұрын
a VERY GOOD EXPLANATION!
@gnitin0384
@gnitin0384 2 жыл бұрын
Thank You!! It cleared my long standing doubt
@alex_fromrsa4815
@alex_fromrsa4815 Жыл бұрын
This just simplified the most confusing part of methods for me in 6 minutes. Thanks
@tauseefakram90
@tauseefakram90 2 жыл бұрын
Very clear explanation with basic example. Thanks !! :)
@mylapalliravi9920
@mylapalliravi9920 3 жыл бұрын
i liked the way of explanation ...easy thank you boss
@dalamattho2307
@dalamattho2307 5 жыл бұрын
Your video is helping me to give a strong interview thx
@yashgupta8336
@yashgupta8336 6 ай бұрын
Brilliant explanantion, Thank you!!!
@alreadytakenindeed
@alreadytakenindeed 3 жыл бұрын
Great description, super simple and easy to understand example, thank you!
@kskchaitanya
@kskchaitanya 6 жыл бұрын
Hi, can you explain more on this topic... How exactly CLR handles this passing using REF and OUT keywords... Please have a look at the example below: private static string ModifyString(string originalInt) { originalInt = string.Empty; return originalInt; } private static string ModifyString(ref string originalInt) { originalInt = string.Empty; return originalInt; } Both these cases are PassByRef because string is reference type... but using the ref keyword, the changes propagate to the caller. My question is, how is the CalledMethod modifying the pointer information of the CallerMethod - (when the value in the CALLEDMETHOD changes, String creates a new memory location for the new value and assigns the new value location to the CALLEDMETHOD and the CALLERMETHOD at the same time).
@mohammedzaid3829
@mohammedzaid3829 2 жыл бұрын
sir very good explanation,, you have covered the concept within very short time..!!
@theuntormented6560
@theuntormented6560 Жыл бұрын
I am very particular about the videos that I click the damned like button Trust me guys this is one of those ❤❤
@PiddBoo
@PiddBoo 5 жыл бұрын
This was really helpful. I appreciate your help.
@geetasharma463
@geetasharma463 2 жыл бұрын
superb explanation thanks now iam confident
@RayanMADAO
@RayanMADAO 2 жыл бұрын
I didn't even know about the step by step bugger (f11) before this video, that's a really cool and helpful feature
@ashishaswal7396
@ashishaswal7396 4 жыл бұрын
thank you for this video.. on the net there were all bullshit differences.. now is the main practical difference that made sense why we use them.. keep making these types of videos
@alexmurghulia6484
@alexmurghulia6484 4 жыл бұрын
thank you for the explanation, it helped a lot, subscribed.
@NoName-1337
@NoName-1337 4 жыл бұрын
Well explained, thank you.
@aungpaingphyo218
@aungpaingphyo218 2 жыл бұрын
thanks alot!I was having trouble differentiating those two
@santhoshkumarkumaresan5201
@santhoshkumarkumaresan5201 5 жыл бұрын
Nice, to add more, the variables should be created before passing to the method for ref and , for out, we can create and pass in method call.
@NEETHUMOHAN38
@NEETHUMOHAN38 5 жыл бұрын
Helped a lot.. Thanks a lot
@artwolfgirl
@artwolfgirl 2 жыл бұрын
Thank you for the clear video!
@मयंककेला
@मयंककेला 4 жыл бұрын
thank you very much but better in (Hindi, Sanskrit ) AnyWay Nice Vdo in Detail Proper Explanation
@mdalaminmahamud3775
@mdalaminmahamud3775 8 жыл бұрын
thanks :D you really saved a lot of time us.
@preeti1820
@preeti1820 3 жыл бұрын
Thank you Sir! This video helped to clear my doubt.
@AlbrechtJ
@AlbrechtJ 3 жыл бұрын
Thanks for a clear explanation.
@manpreet4all
@manpreet4all 5 жыл бұрын
Sir I think callee doesn't returns any thing... actually the changes are happening in a common address space in case of ref and out so values are refelecting... And in case of out it overwritting with 0 in callee so again common address space is overwritten.... Can you correct me plz where i am wrong.
@owenlie
@owenlie 6 жыл бұрын
Best explanation
@ap777200
@ap777200 9 жыл бұрын
Thanks this was very informative!
@dapare00
@dapare00 6 жыл бұрын
Great explanation, thanks!
@hajirrasouli1458
@hajirrasouli1458 3 жыл бұрын
Thank you. Your video helped me a lot!
@Dismanameboi
@Dismanameboi 3 ай бұрын
Amazing explanation once again
@kalinduabeysinghe8917
@kalinduabeysinghe8917 Жыл бұрын
Beautiful explanation!!!
@pranavb9768
@pranavb9768 2 жыл бұрын
Great explaination sir!
@jorgecardona3432
@jorgecardona3432 Жыл бұрын
Really well explained, thank you!
@BattleandBeyond
@BattleandBeyond 10 ай бұрын
Awesome explanation.
@tko1176
@tko1176 Жыл бұрын
Thank you very much. I have a question when is it useful to use the out key world. usually when I call a function it is to do something with the parameters, why would I want the parameters to be generated by the function?
@mehmetalper6156
@mehmetalper6156 3 жыл бұрын
Very good explanation thanks
@mimo8439
@mimo8439 6 жыл бұрын
Thanks u made it clear...
@reyou7
@reyou7 8 жыл бұрын
Very well explained!
@Monirmahir
@Monirmahir 7 жыл бұрын
This is worth watching
@dusan7873
@dusan7873 3 жыл бұрын
Well explained and simple. Thanks.
@alexseresalex1843
@alexseresalex1843 3 жыл бұрын
Your are bloody amazing SHESHARPP!!!! thanks for the content
@rohansolse67
@rohansolse67 6 жыл бұрын
awesome way to explain concept dude
@dillikumarreddy1579
@dillikumarreddy1579 5 жыл бұрын
Pretty helpful. Thank you.
@desaimihir83
@desaimihir83 8 жыл бұрын
Well explained, in other words, simplified explanation.
@rambabumoorthy5808
@rambabumoorthy5808 5 жыл бұрын
easy to understand thank you
@DarthJeremy364
@DarthJeremy364 Жыл бұрын
this is sooo clear thank you!
@imhappynow8471
@imhappynow8471 5 жыл бұрын
Thank you for nice example
@venkatraman4762
@venkatraman4762 3 жыл бұрын
Great Explanation.
@tvsnmurthy2370
@tvsnmurthy2370 6 жыл бұрын
Hey I want to know In which scenario both are using?
@chezchezchezchez
@chezchezchezchez 2 жыл бұрын
LOL weird no one is talking about THAT!!!!!!!!!!!!!
@felixf4378
@felixf4378 8 жыл бұрын
Great explanation dude.
@AbdullahKhan-hz7yr
@AbdullahKhan-hz7yr 8 жыл бұрын
I think you should have mentioned that this default behavior is regarding value types. I know its obvious but I'm sure someone, somewhere out there will assume that reference types will be passed by value!!
@stannisbarracuda5693
@stannisbarracuda5693 6 жыл бұрын
thank you so much what i couldnt understand in a session in class i understood in a 6 min video
@yaminiashok7962
@yaminiashok7962 7 жыл бұрын
you are saying when we use out keyword it will not carry data from caller to the callee but instead of insidevar=insidevar+10 just keep insidevar=10 and debug u can observe that value of insidevar=20 in the method somefunction I think you are wrong sorry if i am wrong please verify and confirm us
@nishant07kumar
@nishant07kumar 7 жыл бұрын
I also believe that in the case of out value will from the main method will be passed to the somefuncton but that value will not be any use as ultimately inside somefunction variable will be initialized and old value will be discarded and new value will be assigned.
@ourtube9405
@ourtube9405 5 жыл бұрын
So what is the exact use of out here?
@manpreet4all
@manpreet4all 5 жыл бұрын
If the person is wrong, they dont have time to reply...
@avinashraj25
@avinashraj25 5 жыл бұрын
Out is used when we need more Return from a function. Function can return Only one value so we have Out keyword. Yes it is of Ref type but we assign the values inside function to this parameter and use it outside of Function.
@jasper5016
@jasper5016 5 жыл бұрын
This is exactly what I thought. out is not actually passing value. Its returning value.
@MyVideoFinder
@MyVideoFinder 9 жыл бұрын
Very nice informative.. I will be very helpful if you able to give links of your domain for the same question in KZbin description.
@dnfvideo
@dnfvideo 9 жыл бұрын
+Abdul Qayyum For more info and materials visit www.questpond.com
@MyVideoFinder
@MyVideoFinder 9 жыл бұрын
ok thanks..
@adammeniata1955
@adammeniata1955 4 жыл бұрын
that was a nice video, thanks!
@TheSphynxoid
@TheSphynxoid 6 жыл бұрын
So they are lke static which allows you to pass even fonctions
@giga_charge
@giga_charge 2 жыл бұрын
Very helpful! Thanks!
@Saandy_
@Saandy_ 8 жыл бұрын
Definitely cleared up some confusion. thanks!
@maneshwam
@maneshwam Жыл бұрын
"0:51 By default variables are passed BY VALUE to methods and functions"
@jasper5016
@jasper5016 5 жыл бұрын
Great video. Thanks. Explanation for out does not make sense. I think out is for returning the value.
@EduTainer
@EduTainer 5 жыл бұрын
What Compiler are you using?
@stewiegriffin6503
@stewiegriffin6503 2 жыл бұрын
I understand it. Thanky you. But what would be the idea behind introducing OUT function ? I guess they needed to make some pattern easier. But I don't see any practicaly use of OUT.
@chezchezchezchez
@chezchezchezchez 2 жыл бұрын
Saving CPU cycles and memory and time. No need to pass the data in? Use OUT!
@priyankatripathi562
@priyankatripathi562 9 жыл бұрын
Very nice explanation..:)
c# (Csharp) and .NET :- Difference between IEnumerable and IEnumerator.
13:39
.NET Interview Preparation videos
Рет қаралды 496 М.
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 41 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 20 МЛН
C# Delegates explained
8:47
.NET Interview Preparation videos
Рет қаралды 517 М.
LEARN how to pass VALUE TYPES  by REFERENCE in C# - Ref, In and Out
24:45
tutorialsEU - C#
Рет қаралды 4,9 М.
.NET and C# are in trouble. Here is what I'd do.
10:57
Ed Andersen
Рет қаралды 109 М.
What is the difference between “out” and “ref” parameters?
6:50
OOP interview questions :- What is the difference between Abstraction and Encapsulation ?
12:34
.NET Interview Preparation videos
Рет қаралды 785 М.
Call By Value & Call By Reference in C
8:34
Neso Academy
Рет қаралды 1,3 МЛН
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 41 МЛН