title: Object when passed as a parameter won't initialize in c# and fails
body: <p>I am trying to pass an object to a method in C# and I am observing that the formal parameter is not being referred to the actual parameter. </p>
  
  <p>My method to which I am passing the object is </p>
  
  <pre><code>public DetailedTSClientInfo GetCommonServerDetails(string servername,DetailedTSClientInfo detailedTsClientInfo)
      {}
  </code></pre>
  
  <p>And I am calling the above method from the below function</p>
  
  <pre><code>public DetailedTSClientInfo GetAppserverDetails(TSClientAddress client)
      {
          var appServer = client.ClientIISserver.ToUpper();
          DetailedTSClientInfo detailedTsClientInfo = new DetailedTSClientInfo();
          detailedTsClientInfo.Name = appServer;
          detailedTsClientInfo = GetCommonServerDetails(appServer,detailedTsClientInfo);
  </code></pre>
  
  <p>I tried using <code>ref</code> and <code>out</code> for this object. However, everytime I get this error which says "<strong>Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.</strong>" and I am not able to get a work around for this. </p>
  
  <p>(Attached an image which shows the error message)</p>
  
  <p>Could anyone please help?</p>
  
  <p>Thanks in advance! </p>
  
  <p><img src="https://i.stack.imgur.com/SeIZW.png" alt="Object_Members"></p>
  
  <p>[Edit-1]
  Here is the exception which I am encountering.</p>
  
  <p><img src="https://i.stack.imgur.com/BN6ZH.png" alt="Exception"></p>