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

        room->Taken = true;
    }