title: How to serialize data into a DTO in C#?
body: <p>This is my first day working with C# and I have a question regarding making requests and creating DTOs. In Java, I can serialize object structures that resemble the expected response. An example of this is,</p>
  
  <pre><code>public class SignInRS extends BaseEntityRS {
  
      @SerializedName("data")
      public Data data;
  
      public class Data {
  
          @SerializedName("user")
          public User user;
  
          @SerializedName("session")
          public Session session;
  
      }
  
  }
  </code></pre>
  
  <p>The question I have is, can I do the same for C#? For example,</p>
  
  <pre><code>public class SigninRS : MonoBehaviour
  {
  
      public Data data;
  
      public class Data
      {
          public User user { get; set; }
          public Session session { get; set; }
      }
  
      public class User
      {
          public string id;
  
          public string phone;
  
          public string email;
      }
  
      public class Session
      {
          public int expirationMinutes;
  
          public string utcExpirationTime;
  
          public string pteExpirationTime;
      }
  }
  </code></pre>
  
  <p>My concern is that I cannot use annotations in C#. I have tried, and I receive errors. How can I accomplish making RESTful APIs?</p>