turn mEnv;} set{mEnv = value;} } ...}And now, somewhere else you use that class, putting it into a PropertyGrid, so you can inspect and change it??s contents:Car mCar = new Car();this.propertyGrid1.SelectedObject = mCar;The property grid will behave correctly for the Length property, allowing you to change it??s value and detecting if the value entered is an int.