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
| using System.Text; | |
| class Product | |
| { | |
| public string? Name { get; set; } | |
| public decimal Price { get; set; } | |
| // ... | |
| } | |
| class Order |
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
| using System.Text; | |
| class Product | |
| { | |
| public string? Name { get; set; } | |
| public decimal Price { get; set; } | |
| } | |
| class Order | |
| { |
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
| using System.Text; | |
| class Product | |
| { | |
| public string? Name { get; set; } | |
| public decimal Price { get; set; } | |
| } | |
| class Order | |
| { |
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
| using System.Text; | |
| class Product | |
| { | |
| public string? Name { get; set; } | |
| public decimal Price { get; set; } | |
| } | |
| class Order | |
| { |
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
| using System.Text; | |
| class Product | |
| { | |
| public string? Name { get; set; } | |
| public decimal Price { get; set; } | |
| } | |
| class Order | |
| { |
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
| interface IBird | |
| { | |
| void Fly(); | |
| void Tweet(); | |
| void Eat(); | |
| } | |
| class Sparrow : IBird | |
| { | |
| // ... |
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
| interface IFlyable | |
| { | |
| void Fly(); | |
| } | |
| interface IEatable | |
| { | |
| void Eat(); | |
| } |
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 Worker | |
| { | |
| // ... | |
| public void DoWork() | |
| { | |
| Console.WriteLine("Працівник працює..."); | |
| } | |
| } | |
| class Manager |
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
| interface IService | |
| { | |
| void ProvideService(); | |
| } | |
| class PizzaDelivery : IService | |
| { | |
| // ... | |
| public void ProvideService() | |
| { |
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
| using System.Text; | |
| namespace LazyInitializationExample | |
| { | |
| class Program | |
| { | |
| static void Main() | |
| { | |
| Console.OutputEncoding = Encoding.UTF8; | |
| var lazy = new LazyHistory(); |