internal class Book
{
// - Properties - //
public string Title { get; set; }
public string Author { get; set; }
// - - Spezified Class Constructor - - //
public Book(string title, string author)
{
Title = title;
Author = author;
}
// - Defining the Delegate - Dotnet: past-tense, -Handler
public delegate void BookNotificationSendedHandler(Book notification);
// - - Methods - - //
public void NotifySMS(Book book)
{
Console.WriteLine($"SMS Send: {book.Title} written by {book.Author} is available!");
}
public static void NotifyMail(Book book)
{
Console.WriteLine($"Mail Send: {book.Title} written by {book.Author} is available!");
}
}
internal class Book
{
// - Properties - //
public string Title { get; set; }
public string Author { get; set; }
// - - Spezified Class Constructor - - //
public Book(string title, string author)
{
Title = title;
Author = author;
}
// - Defining the Delegate - Dotnet: past-tense, -Handler
public delegate void BookNotificationSendedHandler(Book notification);
// - - Methods - - //
public void NotifySMS(Book book)
{
Console.WriteLine($"SMS Send: {book.Title} written by {book.Author} is available!");
}
public static void NotifyMail(Book book)
{
Console.WriteLine($"Mail Send: {book.Title} written by {book.Author} is available!");
}
}