title: C# Is there a way to make the properties of an object in a class non-editable outside the class itself?
body: <p>I am looking for a way to have an object in a class and make it non-editable (the object itself AND its properties) outside the class itself but still visible outside.</p>
  <pre><code>internal class Room
  {
      public string Description { get; set; }
  }
  
  internal class RoomController
  {
      public Room Room { get; private set; }
      
      public RoomController()
      {
          Room = new Room();
      }
  
      //Edit the room inside this class
  }
  
  internal class Foo
  {
      public void SomeMethod()
      {
          RoomController rc = new RoomController();
          
          rc.Room.Description = &quot;something&quot;;   // This should not be allowed 
          string roomDesc = rc.Room.Description;   // This should be fine   
      }
  }
  </code></pre>
  <p>Is something like that possible? I couldn't find anything regarding the issue so I would be grateful if anyone has any ideas.</p>
  <p>Thanks in advance!</p>