- 4
Please help!! I need * <-- Answers
static * Swap * (ref T a, ref T b) { T temp = a; a = b; b = * ; * a; } <T> a T return b temp
3 Answers
+ 2
Hi Shawn
The solution is this:
static T Swap<T> (ref T a, ref T b) {
T temp = a;
a = b;
b = temp ;
return a;
}
0
Kindly view the Microsoft documentation for pointers.
https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/unsafe-code-pointers/pointer-types
0
I have been on this all day and I have no clue, could you answer it, please? It is for my homework.