title: How to print prop name of a class in C#
body: <p>I have a class of name MyClass Which has many properties</p>
  
  <pre><code>class MyClass
  {
      public int Id { get; set; }
  
      public string Name { get; set; }
  
      public string email { get; set; }
  
      public string password { get; set; }
  
      public string city { get; set; }
  }
  </code></pre>
  
  <p>I want to print the properties name in Console.writeline like </p>
  
  <pre><code>static void Main(string[] args)
      {
          MyClass m = new MyClass();
          var s = m.GetType()
                   .GetFields();
          Console.WriteLine(s);
  
  
  
          Console.ReadKey();
      }
  </code></pre>
  
  <p>but it give me every time </p>
  
  <pre><code>System.Reflection.FieldInfo[]
  </code></pre>
  
  <p>Kindly tell me how can i do this or i can do this or not</p>