title: can i simplify this code with conditional operator?
body: <p>I want to get rid of that if else statement is their any way can i do it with the ternary operator/ conditional operators ?</p>
  
  <pre><code>public class control
  {
  public int result;
  public int text;
  }
  
  public class someclas
  {
   control con = new control();
   if(!string.IsNullOrEmpty(error))  //// **Is it possible to use ternary / conditional operator to avoid below if else statements ?**
  {
  control.result = 123;
  control.text = error;
  }
  else
  {
  control.text ="success";
  }
  }
  </code></pre>