Created
April 17, 2014 07:23
-
-
Save Nucleareal/10960604 to your computer and use it in GitHub Desktop.
if文と三項演算子を使わずにaとbの大きい数を表示
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
using System; | |
using System.Collections.Generic; | |
using System.Collections; | |
using System.Linq; | |
namespace Test | |
{ | |
class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var a = 30; | |
var b = 20; | |
var d = new Dictionary<bool, string>() { {false, "{1}"}, {true, "{0}"} }; | |
Console.WriteLine(d[a > b], a, b); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment