title: What is this confusing expression "a == b ? value1 : value2"?
body: <p>I am new to learning C# and Silverlight and have been given some application files by my employer to start learning. I am able to understand most of the logic, methods and syntax used in C# but there is one line which is very confusing to me. I dont have access to my seniors right now to ask them so the logic behind it so I thought I will ask here.</p>
  
  <p>Take a look at this:</p>
  
  <p>In a .xaml.cs file:</p>
  
  <pre><code>List&lt;object&gt; lst = new List&lt;object&gt;();
  lst.Add(GP.mpl.A);
  lst.Add(GP.mpl.B);
  lst.Add(GP.mpl.C);
  lst.Add(GP.mpl.StnNo);
  </code></pre>
  
  <p>In a different .cs file:<br></p>
  
  <pre><code>public int StnNo = Convert.ToInt32(lst[3].ToString() == string.Empty ? 0 : Convert.ToInt32(lst[3].ToString()));
  </code></pre>
  
  <p>I understand that StnNo is being received from lst[3] and converted to Integer through <br></p>
  
  <pre><code>Convert.ToInt32(lst[3].ToString()
  </code></pre>
  
  <p>But I dont understand this part:</p>
  
  <pre><code>== string.Empty ? 0 : Convert.ToInt32(lst[3].ToString())
  </code></pre>
  
  <p>Could you tell me what's going on there? I have done multiple searches on google but didn't find anything related. Thanks for any help.</p>