Created
October 17, 2017 11:56
-
-
Save WiredUK/21d1a61c01580a2fe7b055ec83b46889 to your computer and use it in GitHub Desktop.
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 Method1((string, string) parameter) | |
{ | |
switch (parameter) | |
{ | |
case var tObj when tObj.Item1 == "x": | |
break; | |
} | |
} | |
//Fails with: | |
//CS1061 'object' does not contain a definition for 'Item1' and no extension method 'Item1' accepting a first argument of type 'object' could be found | |
public void Method2(object parameter) | |
{ | |
switch (parameter) | |
{ | |
case var tObj when tObj.Item1 == "x": | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment