29 lines
565 B
C#
29 lines
565 B
C#
namespace Books;
|
|
|
|
public sealed record Book(string Title, string Author, string Publisher, int Year, string ISBN)
|
|
{
|
|
public bool CheckISBNValid()
|
|
{
|
|
try
|
|
{
|
|
CheckISBNValid(ISBN);
|
|
|
|
return true;
|
|
}
|
|
catch (ISBNValidationException ex)
|
|
{
|
|
Console.WriteLine(ex.Message);
|
|
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public static void CheckISBNValid(string isbn)
|
|
{
|
|
const int Length = 13;
|
|
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
|
|
// TODO ISBNValidationException
|