Update Rect.cs

Encapsulated the Rect class to prevent the setting of properties after class deceleration.