Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Session02/Session02/Exercise/Exercise.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

</Project>
25 changes: 25 additions & 0 deletions Session02/Session02/Exercise/Program.cs
Original file line number Diff line number Diff line change
@@ -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();

}
}
}
31 changes: 31 additions & 0 deletions Session02/Session02/Session02.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30413.136
MinimumVisualStudioVersion = 10.0.40219.1
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
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
{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
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CD2718C1-4C7D-4DE5-83CA-6BEDB124EA58}
EndGlobalSection
EndGlobal
18 changes: 18 additions & 0 deletions Session02/Session02/Session02Ex01/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;

namespace Session02Ex01
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");

var integer = 0;
string stinrgValue = "MyStringValue";
Console.WriteLine("Integer is " + integer.ToString());
Console.WriteLine("The Value of StringValue is; " + stinrgValue);

}
}
}
8 changes: 8 additions & 0 deletions Session02/Session02/Session02Ex01/Session02Ex01.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

</Project>
25 changes: 25 additions & 0 deletions Övning/Övning/Övning.sln
Original file line number Diff line number Diff line change
@@ -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
51 changes: 51 additions & 0 deletions Övning/Övning/Övning/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
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++)
{









//try
//{
// numberArray[i] = Convert.ToDouble(inputArray[i]);




//}
//catch (Exception)
//{

// numberArray[i] = 0;

//}

}


}

}
}
8 changes: 8 additions & 0 deletions Övning/Övning/Övning/Övning.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

</Project>