From 966972e3658298afcfc0cf6ada9e0335964553a2 Mon Sep 17 00:00:00 2001 From: SimonMachhabhai Date: Wed, 26 Aug 2020 09:46:35 +0200 Subject: [PATCH 1/6] Commit - Session02 --- Session02/Session02/Session02.sln | 25 +++++++++++++++++++ Session02/Session02/Session02Ex01/Program.cs | 12 +++++++++ .../Session02Ex01/Session02Ex01.csproj | 8 ++++++ 3 files changed, 45 insertions(+) create mode 100644 Session02/Session02/Session02.sln create mode 100644 Session02/Session02/Session02Ex01/Program.cs create mode 100644 Session02/Session02/Session02Ex01/Session02Ex01.csproj diff --git a/Session02/Session02/Session02.sln b/Session02/Session02/Session02.sln new file mode 100644 index 0000000..02f4ef2 --- /dev/null +++ b/Session02/Session02/Session02.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30413.136 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Session02Ex01", "Session02Ex01\Session02Ex01.csproj", "{6403743B-E134-4904-9B94-16A34CB63C86}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6403743B-E134-4904-9B94-16A34CB63C86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6403743B-E134-4904-9B94-16A34CB63C86}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6403743B-E134-4904-9B94-16A34CB63C86}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6403743B-E134-4904-9B94-16A34CB63C86}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CD2718C1-4C7D-4DE5-83CA-6BEDB124EA58} + EndGlobalSection +EndGlobal diff --git a/Session02/Session02/Session02Ex01/Program.cs b/Session02/Session02/Session02Ex01/Program.cs new file mode 100644 index 0000000..b6e1640 --- /dev/null +++ b/Session02/Session02/Session02Ex01/Program.cs @@ -0,0 +1,12 @@ +using System; + +namespace Session02Ex01 +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Hello World!"); + } + } +} diff --git a/Session02/Session02/Session02Ex01/Session02Ex01.csproj b/Session02/Session02/Session02Ex01/Session02Ex01.csproj new file mode 100644 index 0000000..c73e0d1 --- /dev/null +++ b/Session02/Session02/Session02Ex01/Session02Ex01.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp3.1 + + + From 7a51b948d83e9826b9a7f0a5f3e1853b750ee3d4 Mon Sep 17 00:00:00 2001 From: SimonMachhabhai Date: Wed, 26 Aug 2020 10:08:49 +0200 Subject: [PATCH 2/6] Testing integer --- Session02/Session02/Session02Ex01/Program.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Session02/Session02/Session02Ex01/Program.cs b/Session02/Session02/Session02Ex01/Program.cs index b6e1640..db6d9a5 100644 --- a/Session02/Session02/Session02Ex01/Program.cs +++ b/Session02/Session02/Session02Ex01/Program.cs @@ -7,6 +7,10 @@ class Program static void Main(string[] args) { Console.WriteLine("Hello World!"); + + var integer = 0; + + Console.WriteLine("Integer is " + integer.ToString()); } } } From dd9b5635e90f6248a3b4653dbefe885134147454 Mon Sep 17 00:00:00 2001 From: SimonMachhabhai Date: Wed, 26 Aug 2020 10:38:47 +0200 Subject: [PATCH 3/6] Changes --- Session02/Session02/Session02Ex01/Program.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Session02/Session02/Session02Ex01/Program.cs b/Session02/Session02/Session02Ex01/Program.cs index b6e1640..0ddaa13 100644 --- a/Session02/Session02/Session02Ex01/Program.cs +++ b/Session02/Session02/Session02Ex01/Program.cs @@ -7,6 +7,10 @@ class Program static void Main(string[] args) { Console.WriteLine("Hello World!"); + + string stinrgValue = "MyStringValue"; + + Console.WriteLine("The Value of StringValue is; " + stinrgValue); } } } From 52934bb5f39d7768dbff5a811e0492fa35bcc879 Mon Sep 17 00:00:00 2001 From: SimonMachhabhai Date: Wed, 26 Aug 2020 11:55:17 +0200 Subject: [PATCH 4/6] =?UTF-8?q?Vad=20=C3=A4r=20ditt=20namn=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Session02/Session02/Exercise/Exercise.csproj | 8 +++++++ Session02/Session02/Exercise/Program.cs | 25 ++++++++++++++++++++ Session02/Session02/Session02.sln | 8 ++++++- Session02/Session02/Session02Ex01/Program.cs | 1 + 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 Session02/Session02/Exercise/Exercise.csproj create mode 100644 Session02/Session02/Exercise/Program.cs diff --git a/Session02/Session02/Exercise/Exercise.csproj b/Session02/Session02/Exercise/Exercise.csproj new file mode 100644 index 0000000..c73e0d1 --- /dev/null +++ b/Session02/Session02/Exercise/Exercise.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp3.1 + + + diff --git a/Session02/Session02/Exercise/Program.cs b/Session02/Session02/Exercise/Program.cs new file mode 100644 index 0000000..cb121f8 --- /dev/null +++ b/Session02/Session02/Exercise/Program.cs @@ -0,0 +1,25 @@ +using System; + +namespace Exercise +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Hello Mate!"); + + Console.WriteLine("Do you want to enter your name? (y/n)?"); + var key = Console.ReadKey(); + + if (key.KeyChar == 'n') + return; + + Console.WriteLine("Enter your name:"); + var name = Console.ReadLine(); + + Console.WriteLine("Hello, " + name); + Console.ReadKey(); + + } + } +} diff --git a/Session02/Session02/Session02.sln b/Session02/Session02/Session02.sln index 02f4ef2..7da5a65 100644 --- a/Session02/Session02/Session02.sln +++ b/Session02/Session02/Session02.sln @@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30413.136 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Session02Ex01", "Session02Ex01\Session02Ex01.csproj", "{6403743B-E134-4904-9B94-16A34CB63C86}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Session02Ex01", "Session02Ex01\Session02Ex01.csproj", "{6403743B-E134-4904-9B94-16A34CB63C86}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Exercise", "Exercise\Exercise.csproj", "{550C159D-39B6-4958-A631-BCB9A3A9C29C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,6 +17,10 @@ Global {6403743B-E134-4904-9B94-16A34CB63C86}.Debug|Any CPU.Build.0 = Debug|Any CPU {6403743B-E134-4904-9B94-16A34CB63C86}.Release|Any CPU.ActiveCfg = Release|Any CPU {6403743B-E134-4904-9B94-16A34CB63C86}.Release|Any CPU.Build.0 = Release|Any CPU + {550C159D-39B6-4958-A631-BCB9A3A9C29C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {550C159D-39B6-4958-A631-BCB9A3A9C29C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {550C159D-39B6-4958-A631-BCB9A3A9C29C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {550C159D-39B6-4958-A631-BCB9A3A9C29C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Session02/Session02/Session02Ex01/Program.cs b/Session02/Session02/Session02Ex01/Program.cs index 4d72ac4..8cde803 100644 --- a/Session02/Session02/Session02Ex01/Program.cs +++ b/Session02/Session02/Session02Ex01/Program.cs @@ -12,6 +12,7 @@ static void Main(string[] args) string stinrgValue = "MyStringValue"; Console.WriteLine("Integer is " + integer.ToString()); Console.WriteLine("The Value of StringValue is; " + stinrgValue); + } } } From 6e0925783a54add46c612b238e0b6e9b93f68697 Mon Sep 17 00:00:00 2001 From: SimonMachhabhai Date: Fri, 28 Aug 2020 13:08:28 +0200 Subject: [PATCH 5/6] Progress on number app --- .../\303\226vning/\303\226vning.sln" | 25 ++++++++ .../\303\226vning/\303\226vning/Program.cs" | 57 +++++++++++++++++++ .../\303\226vning/\303\226vning.csproj" | 8 +++ 3 files changed, 90 insertions(+) create mode 100644 "\303\226vning/\303\226vning/\303\226vning.sln" create mode 100644 "\303\226vning/\303\226vning/\303\226vning/Program.cs" create mode 100644 "\303\226vning/\303\226vning/\303\226vning/\303\226vning.csproj" diff --git "a/\303\226vning/\303\226vning/\303\226vning.sln" "b/\303\226vning/\303\226vning/\303\226vning.sln" new file mode 100644 index 0000000..9c4f0ad --- /dev/null +++ "b/\303\226vning/\303\226vning/\303\226vning.sln" @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30413.136 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Övning", "Övning\Övning.csproj", "{26EA665F-DE9E-4E1D-92F9-1A698FD262E2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {26EA665F-DE9E-4E1D-92F9-1A698FD262E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {26EA665F-DE9E-4E1D-92F9-1A698FD262E2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {26EA665F-DE9E-4E1D-92F9-1A698FD262E2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {26EA665F-DE9E-4E1D-92F9-1A698FD262E2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C131BC95-457B-48A5-BF9E-D693A15E90F4} + EndGlobalSection +EndGlobal diff --git "a/\303\226vning/\303\226vning/\303\226vning/Program.cs" "b/\303\226vning/\303\226vning/\303\226vning/Program.cs" new file mode 100644 index 0000000..c87b1a6 --- /dev/null +++ "b/\303\226vning/\303\226vning/\303\226vning/Program.cs" @@ -0,0 +1,57 @@ +using System; +using System.Diagnostics; +using System.Globalization; + +namespace Övning +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Mata in värden: "); + + var input = Console.ReadLine(); + var inputArray = input.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + + double[] numberArray = new double[inputArray.Length]; + + + for (int i = 0; i < inputArray.Length; i++) + { + NumberStyles numberStyle = NumberStyles.Integer | NumberStyles.Float; + + bool parsed = double.TryParse(inputArray[i], numberStyle, CultureInfo, InvariantCulture, out) + + if (parsed) + { + numerArra + } + + + + + + + + //try + //{ + // numberArray[i] = Convert.ToDouble(inputArray[i]); + + + + + //} + //catch (Exception) + //{ + + // numberArray[i] = 0; + + //} + + } + + + } + + } +} diff --git "a/\303\226vning/\303\226vning/\303\226vning/\303\226vning.csproj" "b/\303\226vning/\303\226vning/\303\226vning/\303\226vning.csproj" new file mode 100644 index 0000000..c73e0d1 --- /dev/null +++ "b/\303\226vning/\303\226vning/\303\226vning/\303\226vning.csproj" @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp3.1 + + + From 77a4a39447d2758d8e67c69621a99d96ca62e6fc Mon Sep 17 00:00:00 2001 From: SimonMachhabhai Date: Fri, 28 Aug 2020 13:23:22 +0200 Subject: [PATCH 6/6] new change --- "\303\226vning/\303\226vning/\303\226vning/Program.cs" | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git "a/\303\226vning/\303\226vning/\303\226vning/Program.cs" "b/\303\226vning/\303\226vning/\303\226vning/Program.cs" index c87b1a6..6fc9d86 100644 --- "a/\303\226vning/\303\226vning/\303\226vning/Program.cs" +++ "b/\303\226vning/\303\226vning/\303\226vning/Program.cs" @@ -18,15 +18,9 @@ static void Main(string[] args) for (int i = 0; i < inputArray.Length; i++) { - NumberStyles numberStyle = NumberStyles.Integer | NumberStyles.Float; - - bool parsed = double.TryParse(inputArray[i], numberStyle, CultureInfo, InvariantCulture, out) - - if (parsed) - { - numerArra - } + +