Last active
January 26, 2022 10:44
-
-
Save kmb385/ed076b32e5666f8fb5b8a563d9cee42a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Book book = new Book | |
{ | |
Title = "Hit Refresh" | |
}; | |
Book anotherBook = new Book | |
{ | |
book.Title //CS1922: Collection initializer requires its type 'type' to implement System.Collections.IEnumerable. | |
}; | |
class Book | |
{ | |
public string Title { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment