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
| namespace IMJunior | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| var systems = new Dictionary<string, IPaymentFactory> | |
| { | |
| { "QIWI", new QIWIPaymentFactory() }, | |
| { "WebMoney", new WebMoneyPaymentFactory() }, |
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
| public class Player | |
| { | |
| public Player(string name, int age, IWeapon weapon, IMovement movement) | |
| { | |
| if (string.IsNullOrWhiteSpace(name)) | |
| throw new ArgumentException(nameof(name)); | |
| if (age <= 0) | |
| throw new ArgumentException(nameof(age)); |
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
| namespace Lesson | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| var first = new Pathfinder(new FileLogWritter()); | |
| var second = new Pathfinder(new ConsoleLogWritter()); | |
| var third = new Pathfinder(new SecureLogger(new FileLogWritter(), DayOfWeek.Friday)); |
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
| namespace ConsoleApp1 | |
| { | |
| internal class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| Product iPhone12 = new Product("IPhone 12"); | |
| Product iPhone11 = new Product("IPhone 11"); |
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; | |
| namespace Weapon | |
| { | |
| public class Weapon | |
| { | |
| public int Damage { get; private set; } | |
| public int Bullets { get; private set; } | |
| public Weapon(int damage, int bullets) |
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; | |
| using System.Collections.Generic; | |
| namespace MyTask | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| const int NextCarCommand = 1; |
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; | |
| using System.Collections.Generic; | |
| namespace MyTask | |
| { | |
| enum GenderEnum | |
| { | |
| Male, | |
| Female | |
| } |
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; | |
| using System.Collections.Generic; | |
| namespace MyTask | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| const int AddClientCommand = 1; |
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; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace MyTask | |
| { | |
| class Program | |
| { |
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; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace MyTask | |
| { | |
| class Program | |
| { |
NewerOlder