This file contains hidden or 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
| class DateTimeService(IClock clock) | |
| { | |
| private readonly IClock _clock = clock; | |
| public DateTime AddDaysTwice(int days) | |
| { | |
| return _clock.UtcNow.AddDays(days * 2); | |
| } | |
| } |
This file contains hidden or 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
| class DateTimeService(IClock clock) | |
| { | |
| public DateTime AddDaysTwice(int days) | |
| { | |
| return clock.UtcNow.AddDays(days * 2); | |
| } | |
| } |
This file contains hidden or 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
| class DateTimeService | |
| { | |
| private readonly IClock _clock; | |
| public DateTimeService(IClock clock) | |
| { | |
| _clock = clock; | |
| } | |
| public DateTime AddDaysTwice(int days) |
This file contains hidden or 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
| class Person | |
| { | |
| public string Name { get; set; } | |
| } |
This file contains hidden or 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
| class Person | |
| { | |
| private string _name; | |
| public string Name | |
| { | |
| get { return _name; } | |
| set { _name = value; } | |
| } | |
| } |
This file contains hidden or 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
| class Person | |
| { | |
| private string _name; | |
| public void SetName(string name) | |
| { | |
| _name = name; | |
| } | |
| public string GetName() |