-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f09e68b
commit b165b4f
Showing
4 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace ConstructorSample; | ||
|
||
public class Book1 | ||
{ | ||
public Book1(string title, string author) | ||
{ | ||
this.Title = title; | ||
this.Author = author; | ||
} | ||
|
||
public string Title { get; set; } | ||
|
||
public string Author { get; set; } | ||
|
||
public override string ToString() | ||
{ | ||
return $"Title:{this.Title}, Author:{this.Author}"; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace ConstructorSample; | ||
|
||
public class Book2 | ||
{ | ||
public required string Title { get; set; } | ||
|
||
public required string Author { get; set; } | ||
|
||
public override string ToString() | ||
{ | ||
return $"Title:{this.Title}, Author:{this.Author}"; | ||
} | ||
} |
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
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