private unsafe static void Take(HotelRoom *room) { if (room->Taken == false) { room->Taken = true; } }
private unsafe static void Checkin(HotelRoom *room) { if (room->Taken) { throw new ArgumentException("Room is already occupied."); } room->Taken = true; }