Created
April 24, 2012 00:49
-
-
Save ledsun/2475075 to your computer and use it in GitHub Desktop.
dynamicと三項演算子
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
dynamic hoge = true ? "a" : 1; //'string' と 'int’ の間に暗黙的な変換がないため、条件式の型がわかりません。 | |
dynamic fuga; | |
if (true) | |
{ | |
fuga = "a"; | |
} | |
else | |
{ | |
fuga = 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment