Wednesday, August 25, 2010

Small things make me happy

    Today as I was coding, I was writing a regular "if-else" and decided to look at msdn for something different.


So, I found this cool way of writing simple "if-else"


  string[] coding = getVal.Text.Split(getVal.Text.Contains("-") ? '-' : ' ');





 Very elegant and very simple to understand. I love it !! 

No comments: