title: How I Put Data in Json FIle for a constractor property ? I get an error that Name ,Instructor, Credit can't access
body: <pre><code>public class students
      {
          public int ID { get; set; }
          public string fName { get; set; }
          public string mName { get; set; }
          public string lName { get; set; }
          public string Dept { get; set; }
          public string Degree { get; set; }
          public _Semister[] ComplitedSemister { get; set; }
          public string SemesterCode { get; set; }
          public DateTime Year { get; set; }
          
      }
      
      public class _Semister
      {
        
          public string Name { get; set; }
          public string Instructor { get; set; }
          public int Credit { get; set; }
      }
  </code></pre>
  <pre><code> List&lt;students&gt; _data = new List&lt;students&gt;();
              _data.Add(new students()
              {
                  ID = 101,
                  fName = &quot;Kamal&quot;,
                  mName = &quot;Hasan&quot;,
                  lName = &quot;Fahem&quot;,
                  Dept = &quot;CSE&quot;,
                  Degree = &quot;BSC&quot;,
  
                    ComplitedSemister =
                    {
                        Name =&quot;dsg&quot;,
                        Instructor =&quot;Jamal&quot;,
                        Credit =25
                    },
  
                  SemesterCode = &quot;Summer&quot;,
                  Year = DateTime.Parse(&quot;2019-08-01&quot;)
              });
  </code></pre>
  <p>How I Put Data in Json FIle for ComplitedSemister property ? I get an error that  Name ,Instructor, Credit can't access. But Other property also accesss and work properly</p>