Browse Source

Everybody c# 7.3 <3

bastien.monsarrat 6 years ago
parent
commit
56c8a6e721

+ 8 - 2
Adv2018.sln

@@ -61,9 +61,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "D13.Bonus", "D13.Bonus\D13.
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "D14.1", "D14.1\D14.1.csproj", "{FBA155A3-A591-4C0B-B89F-1C789340CC0D}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "D14.2", "D14.2\D14.2.csproj", "{65499119-BBF5-4CF0-895F-F2DD94CD596F}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "D14.2", "D14.2\D14.2.csproj", "{65499119-BBF5-4CF0-895F-F2DD94CD596F}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "D15.1", "D15.1\D15.1.csproj", "{2D30E380-C7F1-4F28-B4E8-7BE19430C6F1}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "D15.1", "D15.1\D15.1.csproj", "{2D30E380-C7F1-4F28-B4E8-7BE19430C6F1}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "D15.2", "D15.2\D15.2.csproj", "{B3178FFF-996C-4876-96A1-68DA9590A7D3}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -195,6 +197,10 @@ Global
 		{2D30E380-C7F1-4F28-B4E8-7BE19430C6F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{2D30E380-C7F1-4F28-B4E8-7BE19430C6F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{2D30E380-C7F1-4F28-B4E8-7BE19430C6F1}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B3178FFF-996C-4876-96A1-68DA9590A7D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{B3178FFF-996C-4876-96A1-68DA9590A7D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B3178FFF-996C-4876-96A1-68DA9590A7D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B3178FFF-996C-4876-96A1-68DA9590A7D3}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 1 - 1
D1.1/D01.1.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D1.2/D01.2.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D1._2</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D10.1/D10.1.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D10._1</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
   <ItemGroup>

+ 1 - 1
D10.2/D10.2.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D10._2</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
   <ItemGroup>

+ 1 - 1
D11.1/D11.1.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D11._1</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D11.2/D11.2.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D11._2</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D12.1/D12.1.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D12._1</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D12.2/D12.2.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D12._2</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D13.1/D13.1.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D13._1</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 2 - 0
D14.1/D14.1.csproj

@@ -22,6 +22,7 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -31,6 +32,7 @@
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="System" />

+ 1 - 0
D14.2/D14.2.csproj

@@ -4,6 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D14._2</RootNamespace>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 10 - 0
D15.2/D15.2.csproj

@@ -0,0 +1,10 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <OutputType>Exe</OutputType>
+    <TargetFramework>netcoreapp2.1</TargetFramework>
+    <RootNamespace>D15._2</RootNamespace>
+    <LangVersion>7.3</LangVersion>
+  </PropertyGroup>
+
+</Project>

+ 319 - 0
D15.2/Program.cs

@@ -0,0 +1,319 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace D15._2
+{
+    abstract class Unit
+    {
+        public int HP = 200;
+        public int Atk = 3;
+        public (int X, int Y) Coord;
+        public bool IsHealthy = true;
+
+        public void Move((int mx, int my) mv) => Coord = (Coord.X + mv.mx, Coord.Y + mv.my);
+
+        public void Attack(Unit target)
+        {
+            target.ReceiveAttack(Atk);
+        }
+
+        private void ReceiveAttack(int atk)
+        {
+            HP -= atk;
+            if (HP <= 0) IsHealthy = false;
+        }
+    }
+
+    class Gob : Unit { }
+    class Elf : Unit { }
+
+    class Map : HashSet<(int x, int y)> { }
+    class Units : List<Unit> { }
+
+    class Program
+    {
+        static readonly (int mx, int my)[] MoveSequence = new[] { (0, -1), (-1, 0), (1, 0), (0, 1) };
+        static int round = 0;
+
+        static bool PRINT = false;
+
+        static void Main(string[] args)
+        {
+            if (args.Length < 1) return;
+            if (File.Exists(args[0]) == false) return;
+            var file = File.OpenText(args[0]);
+
+            var map = new Map();
+            var strMap = new List<string>();
+            var units = new Units();
+
+            FillMap(file, map, strMap, units);
+            if (PRINT) PrintMap(map, strMap, units, 0);
+
+            bool continueCombat = true;
+            do
+            {
+                continueCombat = Tick(map, units);
+                if (continueCombat) round++;
+
+                if (PRINT) PrintMap(map, strMap, units, round);
+
+            } while (continueCombat);
+
+            TheAnswerIs(units, round);
+        }
+
+        private static void PrintMap(Map map, List<string> strMap, Units units, int round)
+        {
+            if (round > 0) Console.WriteLine($"Playing round {round + 1}");
+
+            for (int y = 0; y < strMap.Count; ++y)
+            {
+                var line = strMap[y];
+                List<Unit> ul = new List<Unit>();
+
+                for (var x = 0; x < line.Length; ++x)
+                {
+                    if (!map.Contains((x, y)))
+                        Console.Write("#");
+                    else
+                    {
+                        var u = units.FirstOrDefault(un => un.Coord == (x, y));
+
+                        if (u?.IsHealthy == false) u = null;
+                        if (u != null) ul.Add(u);
+
+                        if (u != null && u is Gob) Console.Write("G");
+                        else if (u != null && u is Elf) Console.Write("E");
+                        else Console.Write(".");
+                    }
+                }
+
+                if (ul.Count > 0)
+                    Console.Write($"\t{ string.Join(", ", ul.Select(u => $"{ (u is Gob ? 'G' : 'E') }({u.HP})")) }");
+
+                Console.WriteLine();
+            }
+        }
+
+        private static void TheAnswerIs(Units units, int round)
+        {
+            var hitPoints = 0;
+            foreach (var unit in units)
+            {
+                Console.WriteLine($"Fighter {unit.GetType().Name} : { (unit.IsHealthy ? $"{unit.HP}HP" : $" - DEAD - ({unit.HP})") }");
+                if (unit.IsHealthy) hitPoints += unit.HP;
+            }
+
+            Console.WriteLine($"\nCombat ends after { round } rounds with { hitPoints } remaining HP");
+
+            Console.WriteLine($"The answer is : { hitPoints * round }\n");
+        }
+
+        private static bool Tick(Map map, Units units)
+        {
+            units.Sort((a, b) =>
+            {
+                if (a.Coord.Y == b.Coord.Y) return a.Coord.X - b.Coord.X;
+                return a.Coord.Y - b.Coord.Y;
+            });
+
+            for (int i = 0; i < units.Count; ++i)
+            {
+                var unit = units[i];
+                if (unit.IsHealthy == false) continue;
+
+                List<Unit> filtered = FilterOnHealthyFoes(units, unit);
+                if (filtered == null || filtered.Count == 0) return false;
+
+                var inRange = new Map();
+
+                var unitNeedsToMove = GetTilesInRange(map, inRange, unit, filtered);
+                if (unitNeedsToMove) MoveUnit(map, units, unit, inRange);
+
+                var targetHasDied = AttackNearestTarget(unit, filtered);
+
+                // If last target has died we end up the simulation
+                if (targetHasDied && filtered.Count == 1)
+                {
+                    bool isFullRound = true;
+                    for (var j = i + 1; j < units.Count; ++j)
+                    {
+                        if (units[j].IsHealthy == false) continue;
+                        isFullRound = false;
+                        break;
+                    }
+                    return isFullRound;
+                }
+            }
+
+            return true;
+        }
+
+        private static bool AttackNearestTarget(Unit unit, List<Unit> filtered)
+        {
+            var target = GetTarget(unit, filtered);
+            if (target != null)
+            {
+                unit.Attack(target);
+
+                if (target.IsHealthy == false)
+                    return true;
+            }
+            return false;
+        }
+
+        private static Unit GetTarget(Unit unit, List<Unit> filtered)
+        {
+            Unit minHpTarget = null;
+
+            foreach (var mv in MoveSequence)
+            {
+                (int x, int y) targetc = (unit.Coord.X + mv.mx, unit.Coord.Y + mv.my);
+                var target = filtered.FirstOrDefault(f => f.Coord == targetc);
+                if (target != default && (minHpTarget == null || target.HP < minHpTarget.HP))
+                    minHpTarget = target;
+            }
+
+            return minHpTarget;
+        }
+
+        private static void MoveUnit(Map map, Units units, Unit unit, Map inRange)
+        {
+            var inRangeActions = new Dictionary<(int x, int y), List<(int x, int y)>>();
+
+            Parallel.ForEach(inRange, (r) =>
+            {
+                GetBreadthFirstSearch(unit, map, units, inRangeActions, r);
+            });
+
+            if (inRangeActions.Count == 0)
+                return;
+
+            var shortest = inRangeActions
+                .OrderBy(ir => ir.Value.Count)
+                .FirstOrDefault();
+
+            unit.Move(shortest.Value.First());
+        }
+
+        // https://en.wikipedia.org/wiki/Breadth-first_search
+        private static void GetBreadthFirstSearch(Unit unit, Map map, Units units, Dictionary<(int x, int y), List<(int x, int y)>> inRangeActions, (int x, int y) root)
+        {
+            var nodesToVisit = new Queue<(int x, int y)>();
+            var visitedNodes = new HashSet<(int x, int y)>();
+            var meta = new Dictionary<(int x, int y), (int x, int y)>()
+                    {
+                        { unit.Coord, (0, 0) }
+                    };
+
+            nodesToVisit.Enqueue(unit.Coord);
+
+            while (nodesToVisit.Count > 0)
+            {
+                var node = nodesToVisit.Dequeue();
+
+                // Found it!
+                if (node == root)
+                {
+                    GetActionList(inRangeActions, root, meta, node);
+                    break;
+                }
+
+                foreach (var mv in MoveSequence)
+                {
+                    (int x, int y) successor = (node.x + mv.mx, node.y + mv.my);
+
+                    // Continue if successor is not a valid tile
+                    if (map.Contains(successor) == false) continue;
+                    if (units.FirstOrDefault(u => u.IsHealthy && u.Coord == successor) != default) continue;
+
+                    if (visitedNodes.Contains(successor)) continue;
+
+                    if (nodesToVisit.Contains(successor) == false)
+                    {
+                        meta.TryAdd(successor, mv);
+                        nodesToVisit.Enqueue(successor);
+                    }
+                }
+
+                visitedNodes.Add(node);
+            }
+        }
+
+        private static void GetActionList(Dictionary<(int x, int y), List<(int x, int y)>> inRangeActions, (int x, int y) root, Dictionary<(int x, int y), (int x, int y)> meta, (int x, int y) node)
+        {
+            var actionList = new List<(int x, int y)>();
+
+            while (meta[node] != (0, 0))
+            {
+                var action = meta[node];
+                node = (node.x - action.x, node.y - action.y);
+                actionList.Add(action);
+            }
+
+            actionList.Reverse();
+
+            lock (inRangeActions) inRangeActions.Add(root, actionList);
+        }
+
+        private static bool GetTilesInRange(Map map, Map inRange, Unit unit, List<Unit> filtered)
+        {
+            foreach (var foe in filtered)
+            {
+                foreach (var move in MoveSequence)
+                {
+                    (int x, int y) nc = (foe.Coord.X + move.mx, foe.Coord.Y + move.my);
+
+                    // Unit has no need to move
+                    if (nc.x == unit.Coord.X && nc.y == unit.Coord.Y)
+                        return false;
+
+                    if (map.Contains(nc)) inRange.Add(nc);
+                }
+            }
+
+            return inRange.Count > 0;
+        }
+
+        private static List<Unit> FilterOnHealthyFoes(Units units, Unit unit)
+        {
+            List<Unit> filtered = null;
+            switch (unit)
+            {
+                case var un when un is Gob: filtered = units.Where(u => u is Elf && u.IsHealthy).ToList(); break;
+                case var un when un is Elf: filtered = units.Where(u => u is Gob && u.IsHealthy).ToList(); break;
+            }
+
+            return filtered;
+        }
+
+        private static void FillMap(StreamReader file, Map map, List<string> strMap, Units units)
+        {
+            int y = 0;
+            do
+            {
+                var line = file.ReadLine();
+                if (line == null) break;
+
+                strMap.Add(line);
+
+                for (int x = 0; x < line.Length; ++x)
+                {
+                    (int x, int y) coord = (x, y);
+
+                    if (line[x] == 'G') units.Add(new Gob() { Coord = coord });
+                    if (line[x] == 'E') units.Add(new Elf() { Coord = coord });
+
+                    if (line[x] != '#') map.Add(coord);
+                }
+
+                y++;
+
+            } while (true);
+        }
+    }
+}

+ 8 - 0
D15.2/Properties/launchSettings.json

@@ -0,0 +1,8 @@
+{
+  "profiles": {
+    "D15.2": {
+      "commandName": "Project",
+      "commandLineArgs": "\"D:\\adv\\Adv2018\\D15.1\\input.txt\" "
+    }
+  }
+}

+ 1 - 1
D2.1/D02.1.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D2._1</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D2.2/D02.2.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D2._2</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D3.1/D03.1.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D3._1</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D3.2/D03.2.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D3._2</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D4.1/D04.1.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D4._1</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D4.2/D04.2.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D4._2</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D5.1/D05.1.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D5._1</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D5.2/D05.2.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D05._2</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D6.1/D06.1.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D6._1</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D6.2/D06.2.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D6._2</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D6.Bonus/D06.Bonus.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
   <ItemGroup>

+ 1 - 1
D7.1/D07.1.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D7._1</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D7.2/D07.2.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D7._2</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D8.1/D08.1.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D8._1</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D8.2/D08.2.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D8._2</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D9.1/D09.1.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D9._1</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
D9.2/D09.2.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RootNamespace>D9._2</RootNamespace>
-    <LangVersion>7.1</LangVersion>
+    <LangVersion>7.3</LangVersion>
   </PropertyGroup>
 
 </Project>