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
9 changes: 9 additions & 0 deletions session02/1fe03/1fe03.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

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

</Project>
30 changes: 30 additions & 0 deletions session02/1fe03/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System;

namespace _1fe03
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Do you whant to lel me yore name? ");
var key = Console.

if()
{

}

else
{

}

string namn= Console.ReadLine();
Console.WriteLine("hello"+namn);
Console.ReadKey();



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

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29926.136
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "session02exersise01", "session02exersise01\session02exersise01.csproj", "{AAE70FA4-8435-428D-8B1C-1D4639C9D83F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "1fe03", "1fe03\1fe03.csproj", "{1F14C4C9-76BF-4BD7-B96B-D4548E2652DD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "session04", "session04\session04.csproj", "{E0579A2D-A747-4AC3-A098-E60129F9FF83}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AAE70FA4-8435-428D-8B1C-1D4639C9D83F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AAE70FA4-8435-428D-8B1C-1D4639C9D83F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AAE70FA4-8435-428D-8B1C-1D4639C9D83F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AAE70FA4-8435-428D-8B1C-1D4639C9D83F}.Release|Any CPU.Build.0 = Release|Any CPU
{1F14C4C9-76BF-4BD7-B96B-D4548E2652DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1F14C4C9-76BF-4BD7-B96B-D4548E2652DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F14C4C9-76BF-4BD7-B96B-D4548E2652DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1F14C4C9-76BF-4BD7-B96B-D4548E2652DD}.Release|Any CPU.Build.0 = Release|Any CPU
{E0579A2D-A747-4AC3-A098-E60129F9FF83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E0579A2D-A747-4AC3-A098-E60129F9FF83}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E0579A2D-A747-4AC3-A098-E60129F9FF83}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E0579A2D-A747-4AC3-A098-E60129F9FF83}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E7CC83FE-25E9-49C8-BB41-634BB599C626}
EndGlobalSection
EndGlobal
19 changes: 19 additions & 0 deletions session02/session02exersise01/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;

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

string value = "jag har en dröm";

Console.WriteLine("the value of my string is" + value);
int gul = 3;

Console.WriteLine("jag har " + gul + "kater");
}
}
}
8 changes: 8 additions & 0 deletions session02/session02exersise01/session02exersise01.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>
83 changes: 83 additions & 0 deletions session02/session04/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
using System;
using System.Globalization;
using System.Linq;
using System.Numerics;

namespace session04
{
class Program
{
static void Main(string[] args)
{
int Q = 0;
Console.WriteLine("Ange ett antal siffror, separerat med kommatecken");
var input = Console.ReadLine();
var inputAray = input.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
double[] numberArray = new double[inputAray.Length];

for (int i=0; i<inputAray.Length;i++)
{
try
{
numberArray[i] = Convert.ToDouble(inputAray[i]);

}

catch(Exception)
{
numberArray[i] = 0;
}

finally //körs alltid,
{

}


for (int i = 0; i < inputAray.Length; i++)
{
bool parsed = double.TryParse(inputAray[i], CultureInfo.InvariantCulture, out double paredValue);

if(parsed==true)
{
numberArray[i] = paredValue;
}

else
{
numberArray[i] = null;
}
}


}
/*

int execeptionStatus=1

try
{
execeptionStatus
}

throw new exeption ("provocerat fel");
*/

foreach (var number in inputAray)
{
Console.WriteLine("Värdet är " + number);
Console.WriteLine("");

}







Console.WriteLine(" l" +inputAray.Length);

}
}
}
8 changes: 8 additions & 0 deletions session02/session04/session04.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>