So basically if we are confirming to generic with one T type, So you have to pass same data type. You can either pass both int, both string or any same data type
Because int can always be typecasted to Double. Thats why its working. If you will notice your print value, You will find that Int will convert to double
There are 46 videos I think in this playlist. Let me know what specific topic you need. I will anyway keep adding. Thanks for watching. Do subscribe for updates
Thank you man for the explanation!!! it's very clear to me now when to use which one >D keep doing great work man and thank you!!!
Thanks
Welcome. Thanks for support! 👏
Well done, friend. I loved it!
Glad it helped You
Hi Nilesh,
at 18:46 no problem if we use Int and double, can you please explain
So basically if we are confirming to generic with one T type, So you have to pass same data type. You can either pass both int, both string or any same data type
@@AppDeveloperPoint but one int and one double working fine.
func printNumbers(a:T,b:T){
print(a)
print(b)
}
printNumbers(a: 2,b: 3.5)
Because int can always be typecasted to Double. Thats why its working. If you will notice your print value, You will find that Int will convert to double
@@AppDeveloperPoint got it. thanks
Thanks Very Underrated channel
Thanks for the video. Very useful and liked, keep it up.
Thanks, will do!
this video really help full for us please continue for logical and tricky question
Really enjoyed this video....Good job.... Thanks
Glad you liked it
good stuff bro... do more videos on interview series ♣︎
There are 46 videos I think in this playlist. Let me know what specific topic you need. I will anyway keep adding. Thanks for watching. Do subscribe
for updates
Nice... Thanks
Nice 👌
Thanks 😊
Thank you so much sir
Thanks