To validate that a book has an author and a correct ISBN in C#, you can define a Book class with properties for the author and the ISBN. You can then write a validation method that checks if the author is not null or empty, and if the ISBN is a valid 10-digit or 13-digit number.
main.cs1120 chars47 lines
You can then use the validation method to check if a given book object has a valid author and ISBN:
main.cs145 chars4 lines
gistlibby LogSnag