title: Methods of simplifying ugly nested if-else trees in C#
body: <p>Sometimes I'm writing ugly if-else statements in C# 3.5; I'm aware of some different approaches to simplifying that with table-driven development, class hierarchy, anonimous methods and some more.
  The problem is that alternatives are still less wide-spread than writing traditional ugly if-else statements because there is no convention for that.</p>
  
  <p>What depth of nested if-else is normal for C# 3.5? What methods do you expect to see instead of nested if-else the first? the second?</p>
  
  <p>if i have ten input parameters with 3 states in each, i should map functions to combination of each state of each parameter (really less, because not all the states are valid, but sometimes still a lot). I can express these states as a hashtable key and a handler (lambda) which will be called if key matches. </p>
  
  <p>It is still mix of table-driven, data-driven dev. ideas and pattern matching.     </p>
  
  <p>what i'm looking for is extending for C# such approaches as this for scripting (C# 3.5 is rather like scripting)
  <a href="http://blogs.msdn.com/ericlippert/archive/2004/02/24/79292.aspx" rel="noreferrer">http://blogs.msdn.com/ericlippert/archive/2004/02/24/79292.aspx</a> </p>