I need a answer can you answer this please | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I need a answer can you answer this please

Drag and drop from the options below to define a generic method that swaps the values of its arguments and returns the value of the first argument. static ___ Swap ____ (ref T a, ref T b) { T temp = a; a = b; b = _____ ; _____ a; } T return <T> b a temp

17th Jun 2020, 3:59 PM
Ghel Lancion
Ghel Lancion - avatar
2 Answers
+ 5
Please don't give challenges,homeworks or Assignments here QnA forum is only limited to programming related queries or Sololearn issues Now plz move this question to your activity feed or show your atttempt for further help Follow our Guidelines:- https://www.sololearn.com/discuss/333866/?ref=app HaPpY CoDiNg 🙂
17th Jun 2020, 4:17 PM
Galaxy-Coding (inactive)
Galaxy-Coding (inactive) - avatar
+ 1
static T Swap <T> (ref T a, ref T b) { T temp = a; a = b; b = temp; return a; } Enjoy!
8th Aug 2021, 11:02 AM
Alex Kondratyk