static void Main(string[] args) { Book book1 = new Book(); book1.Open(); book1.Close(); book1.WriteIf(true, "sex"); book1.WriteIf(false, "sex"); }