Last active
July 19, 2019 09:40
-
-
Save daneb/13124e5ec2369117aff8fc27a3a861e5 to your computer and use it in GitHub Desktop.
Generics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void SwapInt(ref int lhs,ref int rhs) | |
{ | |
int temp; | |
temp = lhs; | |
lhs = rhs; | |
rhs = temp; | |
} | |
public void SwapString(ref string lhs, ref string rhs) | |
{ | |
string temp; | |
temp = lhs; | |
lhs = rhs; | |
rhs = temp; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment