commit 8a754080ba867e9ecf2eba584b469c274003ed7a Author: Christian Ohlsson Date: Thu Feb 22 23:01:00 2018 +0100 Initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/1.1-Hello/Hello.cs b/1.1-Hello/Hello.cs new file mode 100644 index 0000000..d837b3a --- /dev/null +++ b/1.1-Hello/Hello.cs @@ -0,0 +1,7 @@ +using System; + +class Hello { + public static void Main() { + Console.WriteLine("Hello World in C#!"); + } +} \ No newline at end of file diff --git a/1.1-Hello/Hello.exe b/1.1-Hello/Hello.exe new file mode 100644 index 0000000..8ddd231 Binary files /dev/null and b/1.1-Hello/Hello.exe differ diff --git a/1.2-HelloWorld/1.2-HelloWorld.csproj b/1.2-HelloWorld/1.2-HelloWorld.csproj new file mode 100644 index 0000000..f264a9b --- /dev/null +++ b/1.2-HelloWorld/1.2-HelloWorld.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {52E355AA-7AE9-4E3A-A678-60BAC45D5EFF} + Exe + HelloWorld + 1.2-HelloWorld + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/1.2-HelloWorld/1.2-HelloWorld.sln b/1.2-HelloWorld/1.2-HelloWorld.sln new file mode 100644 index 0000000..6dc8b79 --- /dev/null +++ b/1.2-HelloWorld/1.2-HelloWorld.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "1.2-HelloWorld", "1.2-HelloWorld.csproj", "{52E355AA-7AE9-4E3A-A678-60BAC45D5EFF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {52E355AA-7AE9-4E3A-A678-60BAC45D5EFF}.Debug|x86.ActiveCfg = Debug|x86 + {52E355AA-7AE9-4E3A-A678-60BAC45D5EFF}.Debug|x86.Build.0 = Debug|x86 + {52E355AA-7AE9-4E3A-A678-60BAC45D5EFF}.Release|x86.ActiveCfg = Release|x86 + {52E355AA-7AE9-4E3A-A678-60BAC45D5EFF}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/1.2-HelloWorld/1.2-HelloWorld.userprefs b/1.2-HelloWorld/1.2-HelloWorld.userprefs new file mode 100644 index 0000000..6b13a9a --- /dev/null +++ b/1.2-HelloWorld/1.2-HelloWorld.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/1.2-HelloWorld/HelloWorld.cs b/1.2-HelloWorld/HelloWorld.cs new file mode 100644 index 0000000..5a311ec --- /dev/null +++ b/1.2-HelloWorld/HelloWorld.cs @@ -0,0 +1,7 @@ +using System; + +class HelloWorld { + public static void Main() { + Console.WriteLine("Hello World in MonoDevelop"); + } +} \ No newline at end of file diff --git a/1.2-HelloWorld/bin/Debug/1.2-HelloWorld.exe b/1.2-HelloWorld/bin/Debug/1.2-HelloWorld.exe new file mode 100644 index 0000000..e03bd6e Binary files /dev/null and b/1.2-HelloWorld/bin/Debug/1.2-HelloWorld.exe differ diff --git a/1.2-HelloWorld/bin/Debug/1.2-HelloWorld.pdb b/1.2-HelloWorld/bin/Debug/1.2-HelloWorld.pdb new file mode 100644 index 0000000..9289a2f Binary files /dev/null and b/1.2-HelloWorld/bin/Debug/1.2-HelloWorld.pdb differ diff --git a/1.2-HelloWorld/obj/x86/Debug/1.2-HelloWorld.csproj.FileListAbsolute.txt b/1.2-HelloWorld/obj/x86/Debug/1.2-HelloWorld.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..ad04cdf --- /dev/null +++ b/1.2-HelloWorld/obj/x86/Debug/1.2-HelloWorld.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\1.2-HelloWorld\bin\Debug\1.2-HelloWorld.exe +C:\Users\Crille\CSharp\1.2-HelloWorld\bin\Debug\1.2-HelloWorld.pdb +C:\Users\Crille\CSharp\1.2-HelloWorld\obj\x86\Debug\1.2-HelloWorld.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\1.2-HelloWorld\obj\x86\Debug\1.2-HelloWorld.exe +C:\Users\Crille\CSharp\1.2-HelloWorld\obj\x86\Debug\1.2-HelloWorld.pdb diff --git a/1.2-HelloWorld/obj/x86/Debug/1.2-HelloWorld.csprojResolveAssemblyReference.cache b/1.2-HelloWorld/obj/x86/Debug/1.2-HelloWorld.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/1.2-HelloWorld/obj/x86/Debug/1.2-HelloWorld.csprojResolveAssemblyReference.cache differ diff --git a/1.2-HelloWorld/obj/x86/Debug/1.2-HelloWorld.exe b/1.2-HelloWorld/obj/x86/Debug/1.2-HelloWorld.exe new file mode 100644 index 0000000..e03bd6e Binary files /dev/null and b/1.2-HelloWorld/obj/x86/Debug/1.2-HelloWorld.exe differ diff --git a/1.2-HelloWorld/obj/x86/Debug/1.2-HelloWorld.pdb b/1.2-HelloWorld/obj/x86/Debug/1.2-HelloWorld.pdb new file mode 100644 index 0000000..9289a2f Binary files /dev/null and b/1.2-HelloWorld/obj/x86/Debug/1.2-HelloWorld.pdb differ diff --git a/1.2-HelloWorld/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/1.2-HelloWorld/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/1.2-HelloWorld/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/1.2-HelloWorld/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/1.2-HelloWorld/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/1.2-HelloWorld/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.1-StringPrint/10.1-StringPrint.csproj b/10.1-StringPrint/10.1-StringPrint.csproj new file mode 100644 index 0000000..448b2dd --- /dev/null +++ b/10.1-StringPrint/10.1-StringPrint.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {B3355BB9-FB23-4D06-B7ED-C123401C08A2} + Exe + StringPrint + 10.1-StringPrint + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/10.1-StringPrint/10.1-StringPrint.sln b/10.1-StringPrint/10.1-StringPrint.sln new file mode 100644 index 0000000..0ca092e --- /dev/null +++ b/10.1-StringPrint/10.1-StringPrint.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "10.1-StringPrint", "10.1-StringPrint.csproj", "{B3355BB9-FB23-4D06-B7ED-C123401C08A2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B3355BB9-FB23-4D06-B7ED-C123401C08A2}.Debug|x86.ActiveCfg = Debug|x86 + {B3355BB9-FB23-4D06-B7ED-C123401C08A2}.Debug|x86.Build.0 = Debug|x86 + {B3355BB9-FB23-4D06-B7ED-C123401C08A2}.Release|x86.ActiveCfg = Release|x86 + {B3355BB9-FB23-4D06-B7ED-C123401C08A2}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/10.1-StringPrint/10.1-StringPrint.userprefs b/10.1-StringPrint/10.1-StringPrint.userprefs new file mode 100644 index 0000000..daaab58 --- /dev/null +++ b/10.1-StringPrint/10.1-StringPrint.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/10.1-StringPrint/StringPrint.cs b/10.1-StringPrint/StringPrint.cs new file mode 100644 index 0000000..5c148b4 --- /dev/null +++ b/10.1-StringPrint/StringPrint.cs @@ -0,0 +1,15 @@ +using System; + +class StringPrint { + public static void Main() { + string message = "This is just a normal string."; + + Console.WriteLine("Message: " + message); + Console.WriteLine("Message: {0}", message); + Console.WriteLine("Langd: {0}", message.Length); + + for (int i = 0; i < message.Length; i++) { + Console.WriteLine("message[{0}]: {1}", i, message[i]); + } + } +} diff --git a/10.1-StringPrint/bin/Debug/10.1-StringPrint.exe b/10.1-StringPrint/bin/Debug/10.1-StringPrint.exe new file mode 100644 index 0000000..c9e2c7a Binary files /dev/null and b/10.1-StringPrint/bin/Debug/10.1-StringPrint.exe differ diff --git a/10.1-StringPrint/bin/Debug/10.1-StringPrint.pdb b/10.1-StringPrint/bin/Debug/10.1-StringPrint.pdb new file mode 100644 index 0000000..fab7ad1 Binary files /dev/null and b/10.1-StringPrint/bin/Debug/10.1-StringPrint.pdb differ diff --git a/10.1-StringPrint/obj/x86/Debug/10.1-StringPrint.csproj.FileListAbsolute.txt b/10.1-StringPrint/obj/x86/Debug/10.1-StringPrint.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..5c7a09f --- /dev/null +++ b/10.1-StringPrint/obj/x86/Debug/10.1-StringPrint.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\10.1-StringPrint\bin\Debug\10.1-StringPrint.exe +C:\Users\Crille\CSharp\10.1-StringPrint\bin\Debug\10.1-StringPrint.pdb +C:\Users\Crille\CSharp\10.1-StringPrint\obj\x86\Debug\10.1-StringPrint.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\10.1-StringPrint\obj\x86\Debug\10.1-StringPrint.exe +C:\Users\Crille\CSharp\10.1-StringPrint\obj\x86\Debug\10.1-StringPrint.pdb diff --git a/10.1-StringPrint/obj/x86/Debug/10.1-StringPrint.csprojResolveAssemblyReference.cache b/10.1-StringPrint/obj/x86/Debug/10.1-StringPrint.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/10.1-StringPrint/obj/x86/Debug/10.1-StringPrint.csprojResolveAssemblyReference.cache differ diff --git a/10.1-StringPrint/obj/x86/Debug/10.1-StringPrint.exe b/10.1-StringPrint/obj/x86/Debug/10.1-StringPrint.exe new file mode 100644 index 0000000..c9e2c7a Binary files /dev/null and b/10.1-StringPrint/obj/x86/Debug/10.1-StringPrint.exe differ diff --git a/10.1-StringPrint/obj/x86/Debug/10.1-StringPrint.pdb b/10.1-StringPrint/obj/x86/Debug/10.1-StringPrint.pdb new file mode 100644 index 0000000..fab7ad1 Binary files /dev/null and b/10.1-StringPrint/obj/x86/Debug/10.1-StringPrint.pdb differ diff --git a/10.1-StringPrint/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/10.1-StringPrint/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.1-StringPrint/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/10.1-StringPrint/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.1-StringPrint/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/10.1-StringPrint/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.2-StringEscape/10.2-StringEscape.csproj b/10.2-StringEscape/10.2-StringEscape.csproj new file mode 100644 index 0000000..b9fd197 --- /dev/null +++ b/10.2-StringEscape/10.2-StringEscape.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {73A72A66-B646-4984-8E71-EF6DF4014E6C} + Exe + StringEscape + 10.2-StringEscape + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/10.2-StringEscape/10.2-StringEscape.sln b/10.2-StringEscape/10.2-StringEscape.sln new file mode 100644 index 0000000..27bc7e8 --- /dev/null +++ b/10.2-StringEscape/10.2-StringEscape.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "10.2-StringEscape", "10.2-StringEscape.csproj", "{73A72A66-B646-4984-8E71-EF6DF4014E6C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {73A72A66-B646-4984-8E71-EF6DF4014E6C}.Debug|x86.ActiveCfg = Debug|x86 + {73A72A66-B646-4984-8E71-EF6DF4014E6C}.Debug|x86.Build.0 = Debug|x86 + {73A72A66-B646-4984-8E71-EF6DF4014E6C}.Release|x86.ActiveCfg = Release|x86 + {73A72A66-B646-4984-8E71-EF6DF4014E6C}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/10.2-StringEscape/10.2-StringEscape.userprefs b/10.2-StringEscape/10.2-StringEscape.userprefs new file mode 100644 index 0000000..415f9f9 --- /dev/null +++ b/10.2-StringEscape/10.2-StringEscape.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/10.2-StringEscape/StringEscape.cs b/10.2-StringEscape/StringEscape.cs new file mode 100644 index 0000000..f3075e0 --- /dev/null +++ b/10.2-StringEscape/StringEscape.cs @@ -0,0 +1,25 @@ +using System; + +class StringEscape { + public static void Main() { + string s1 = "This is just a piece of text"; + Console.WriteLine(s1); + + string s2 = "Double quotes (\") is important and backslash (\\) too."; + Console.WriteLine(s2); + + string s3 = "This is a very long line \nof test that should be on two lines."; + Console.WriteLine(s3); + + string s4 = "Anna \t65 \tGDFS"; + string s5 = "Bertil \t54 \tFDSA"; + string s6 = "Catrin \t12 \tSG"; + string s7 = "David \t57 \tGF"; + + Console.WriteLine("=================================="); + Console.WriteLine(s4); + Console.WriteLine(s5); + Console.WriteLine(s6); + Console.WriteLine(s7); + } +} diff --git a/10.2-StringEscape/bin/Debug/10.2-StringEscape.exe b/10.2-StringEscape/bin/Debug/10.2-StringEscape.exe new file mode 100644 index 0000000..c562523 Binary files /dev/null and b/10.2-StringEscape/bin/Debug/10.2-StringEscape.exe differ diff --git a/10.2-StringEscape/bin/Debug/10.2-StringEscape.pdb b/10.2-StringEscape/bin/Debug/10.2-StringEscape.pdb new file mode 100644 index 0000000..7dc0981 Binary files /dev/null and b/10.2-StringEscape/bin/Debug/10.2-StringEscape.pdb differ diff --git a/10.2-StringEscape/obj/x86/Debug/10.2-StringEscape.csproj.FileListAbsolute.txt b/10.2-StringEscape/obj/x86/Debug/10.2-StringEscape.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..a63688f --- /dev/null +++ b/10.2-StringEscape/obj/x86/Debug/10.2-StringEscape.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\10.2-StringEscape\bin\Debug\10.2-StringEscape.exe +C:\Users\Crille\CSharp\10.2-StringEscape\bin\Debug\10.2-StringEscape.pdb +C:\Users\Crille\CSharp\10.2-StringEscape\obj\x86\Debug\10.2-StringEscape.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\10.2-StringEscape\obj\x86\Debug\10.2-StringEscape.exe +C:\Users\Crille\CSharp\10.2-StringEscape\obj\x86\Debug\10.2-StringEscape.pdb diff --git a/10.2-StringEscape/obj/x86/Debug/10.2-StringEscape.csprojResolveAssemblyReference.cache b/10.2-StringEscape/obj/x86/Debug/10.2-StringEscape.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/10.2-StringEscape/obj/x86/Debug/10.2-StringEscape.csprojResolveAssemblyReference.cache differ diff --git a/10.2-StringEscape/obj/x86/Debug/10.2-StringEscape.exe b/10.2-StringEscape/obj/x86/Debug/10.2-StringEscape.exe new file mode 100644 index 0000000..c562523 Binary files /dev/null and b/10.2-StringEscape/obj/x86/Debug/10.2-StringEscape.exe differ diff --git a/10.2-StringEscape/obj/x86/Debug/10.2-StringEscape.pdb b/10.2-StringEscape/obj/x86/Debug/10.2-StringEscape.pdb new file mode 100644 index 0000000..7dc0981 Binary files /dev/null and b/10.2-StringEscape/obj/x86/Debug/10.2-StringEscape.pdb differ diff --git a/10.2-StringEscape/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/10.2-StringEscape/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.2-StringEscape/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/10.2-StringEscape/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.2-StringEscape/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/10.2-StringEscape/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.3-UpperLowerCase/10.3-UpperLowerCase.csproj b/10.3-UpperLowerCase/10.3-UpperLowerCase.csproj new file mode 100644 index 0000000..b620222 --- /dev/null +++ b/10.3-UpperLowerCase/10.3-UpperLowerCase.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {0557EB80-46E7-486A-B339-893C500FCA44} + Exe + UpperLowerCase + 10.3-UpperLowerCase + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/10.3-UpperLowerCase/10.3-UpperLowerCase.sln b/10.3-UpperLowerCase/10.3-UpperLowerCase.sln new file mode 100644 index 0000000..248be1d --- /dev/null +++ b/10.3-UpperLowerCase/10.3-UpperLowerCase.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "10.3-UpperLowerCase", "10.3-UpperLowerCase.csproj", "{0557EB80-46E7-486A-B339-893C500FCA44}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0557EB80-46E7-486A-B339-893C500FCA44}.Debug|x86.ActiveCfg = Debug|x86 + {0557EB80-46E7-486A-B339-893C500FCA44}.Debug|x86.Build.0 = Debug|x86 + {0557EB80-46E7-486A-B339-893C500FCA44}.Release|x86.ActiveCfg = Release|x86 + {0557EB80-46E7-486A-B339-893C500FCA44}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/10.3-UpperLowerCase/10.3-UpperLowerCase.userprefs b/10.3-UpperLowerCase/10.3-UpperLowerCase.userprefs new file mode 100644 index 0000000..a6b39aa --- /dev/null +++ b/10.3-UpperLowerCase/10.3-UpperLowerCase.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/10.3-UpperLowerCase/UpperLowerCase.cs b/10.3-UpperLowerCase/UpperLowerCase.cs new file mode 100644 index 0000000..b4b4e47 --- /dev/null +++ b/10.3-UpperLowerCase/UpperLowerCase.cs @@ -0,0 +1,15 @@ +using System; + +class UpperLowerCase { + public static void Main() { + string s1 = " ThIS iS jUSt a NORmal pieCe Of TexT. "; + + Console.WriteLine(s1); + Console.WriteLine(s1.ToUpper()); + Console.WriteLine(s1.ToLower()); + + Console.WriteLine(s1.TrimEnd()); + Console.WriteLine(s1.TrimStart()); + Console.WriteLine(s1.Trim()); + } +} diff --git a/10.3-UpperLowerCase/bin/Debug/10.3-UpperLowerCase.exe b/10.3-UpperLowerCase/bin/Debug/10.3-UpperLowerCase.exe new file mode 100644 index 0000000..13876fa Binary files /dev/null and b/10.3-UpperLowerCase/bin/Debug/10.3-UpperLowerCase.exe differ diff --git a/10.3-UpperLowerCase/bin/Debug/10.3-UpperLowerCase.pdb b/10.3-UpperLowerCase/bin/Debug/10.3-UpperLowerCase.pdb new file mode 100644 index 0000000..2f96ab9 Binary files /dev/null and b/10.3-UpperLowerCase/bin/Debug/10.3-UpperLowerCase.pdb differ diff --git a/10.3-UpperLowerCase/obj/x86/Debug/10.3-UpperLowerCase.csproj.FileListAbsolute.txt b/10.3-UpperLowerCase/obj/x86/Debug/10.3-UpperLowerCase.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..b5ee9c6 --- /dev/null +++ b/10.3-UpperLowerCase/obj/x86/Debug/10.3-UpperLowerCase.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\10.3-UpperLowerCase\bin\Debug\10.3-UpperLowerCase.exe +C:\Users\Crille\CSharp\10.3-UpperLowerCase\bin\Debug\10.3-UpperLowerCase.pdb +C:\Users\Crille\CSharp\10.3-UpperLowerCase\obj\x86\Debug\10.3-UpperLowerCase.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\10.3-UpperLowerCase\obj\x86\Debug\10.3-UpperLowerCase.exe +C:\Users\Crille\CSharp\10.3-UpperLowerCase\obj\x86\Debug\10.3-UpperLowerCase.pdb diff --git a/10.3-UpperLowerCase/obj/x86/Debug/10.3-UpperLowerCase.csprojResolveAssemblyReference.cache b/10.3-UpperLowerCase/obj/x86/Debug/10.3-UpperLowerCase.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/10.3-UpperLowerCase/obj/x86/Debug/10.3-UpperLowerCase.csprojResolveAssemblyReference.cache differ diff --git a/10.3-UpperLowerCase/obj/x86/Debug/10.3-UpperLowerCase.exe b/10.3-UpperLowerCase/obj/x86/Debug/10.3-UpperLowerCase.exe new file mode 100644 index 0000000..13876fa Binary files /dev/null and b/10.3-UpperLowerCase/obj/x86/Debug/10.3-UpperLowerCase.exe differ diff --git a/10.3-UpperLowerCase/obj/x86/Debug/10.3-UpperLowerCase.pdb b/10.3-UpperLowerCase/obj/x86/Debug/10.3-UpperLowerCase.pdb new file mode 100644 index 0000000..2f96ab9 Binary files /dev/null and b/10.3-UpperLowerCase/obj/x86/Debug/10.3-UpperLowerCase.pdb differ diff --git a/10.3-UpperLowerCase/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/10.3-UpperLowerCase/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.3-UpperLowerCase/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/10.3-UpperLowerCase/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.3-UpperLowerCase/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/10.3-UpperLowerCase/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.4-IndexOf/10.4-IndexOf.csproj b/10.4-IndexOf/10.4-IndexOf.csproj new file mode 100644 index 0000000..76d4113 --- /dev/null +++ b/10.4-IndexOf/10.4-IndexOf.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {1F69D2C8-C291-4E63-AB6D-418645ED3652} + Exe + IndexOf + 10.4-IndexOf + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/10.4-IndexOf/10.4-IndexOf.sln b/10.4-IndexOf/10.4-IndexOf.sln new file mode 100644 index 0000000..8e4c8c8 --- /dev/null +++ b/10.4-IndexOf/10.4-IndexOf.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "10.4-IndexOf", "10.4-IndexOf.csproj", "{1F69D2C8-C291-4E63-AB6D-418645ED3652}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1F69D2C8-C291-4E63-AB6D-418645ED3652}.Debug|x86.ActiveCfg = Debug|x86 + {1F69D2C8-C291-4E63-AB6D-418645ED3652}.Debug|x86.Build.0 = Debug|x86 + {1F69D2C8-C291-4E63-AB6D-418645ED3652}.Release|x86.ActiveCfg = Release|x86 + {1F69D2C8-C291-4E63-AB6D-418645ED3652}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/10.4-IndexOf/10.4-IndexOf.userprefs b/10.4-IndexOf/10.4-IndexOf.userprefs new file mode 100644 index 0000000..6f94afa --- /dev/null +++ b/10.4-IndexOf/10.4-IndexOf.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/10.4-IndexOf/IndexOf.cs b/10.4-IndexOf/IndexOf.cs new file mode 100644 index 0000000..e1e8b44 --- /dev/null +++ b/10.4-IndexOf/IndexOf.cs @@ -0,0 +1,13 @@ +using System; + +class IndexOf { + public static void Main() { + string s1 = "Denna text kan man leka med en stund."; + + Console.WriteLine(s1.IndexOf("te")); + Console.WriteLine(s1.IndexOf("yhfdsnhbvfd")); + Console.WriteLine(s1.IndexOf("De")); + Console.WriteLine(s1.IndexOf("k")); + Console.WriteLine(s1.IndexOf("k", 12)); + } +} diff --git a/10.4-IndexOf/bin/Debug/10.4-IndexOf.exe b/10.4-IndexOf/bin/Debug/10.4-IndexOf.exe new file mode 100644 index 0000000..6c3dd48 Binary files /dev/null and b/10.4-IndexOf/bin/Debug/10.4-IndexOf.exe differ diff --git a/10.4-IndexOf/bin/Debug/10.4-IndexOf.pdb b/10.4-IndexOf/bin/Debug/10.4-IndexOf.pdb new file mode 100644 index 0000000..19aa98a Binary files /dev/null and b/10.4-IndexOf/bin/Debug/10.4-IndexOf.pdb differ diff --git a/10.4-IndexOf/obj/x86/Debug/10.4-IndexOf.csproj.FileListAbsolute.txt b/10.4-IndexOf/obj/x86/Debug/10.4-IndexOf.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..1c8cb7c --- /dev/null +++ b/10.4-IndexOf/obj/x86/Debug/10.4-IndexOf.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\10.4-IndexOf\bin\Debug\10.4-IndexOf.exe +C:\Users\Crille\CSharp\10.4-IndexOf\bin\Debug\10.4-IndexOf.pdb +C:\Users\Crille\CSharp\10.4-IndexOf\obj\x86\Debug\10.4-IndexOf.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\10.4-IndexOf\obj\x86\Debug\10.4-IndexOf.exe +C:\Users\Crille\CSharp\10.4-IndexOf\obj\x86\Debug\10.4-IndexOf.pdb diff --git a/10.4-IndexOf/obj/x86/Debug/10.4-IndexOf.csprojResolveAssemblyReference.cache b/10.4-IndexOf/obj/x86/Debug/10.4-IndexOf.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/10.4-IndexOf/obj/x86/Debug/10.4-IndexOf.csprojResolveAssemblyReference.cache differ diff --git a/10.4-IndexOf/obj/x86/Debug/10.4-IndexOf.exe b/10.4-IndexOf/obj/x86/Debug/10.4-IndexOf.exe new file mode 100644 index 0000000..6c3dd48 Binary files /dev/null and b/10.4-IndexOf/obj/x86/Debug/10.4-IndexOf.exe differ diff --git a/10.4-IndexOf/obj/x86/Debug/10.4-IndexOf.pdb b/10.4-IndexOf/obj/x86/Debug/10.4-IndexOf.pdb new file mode 100644 index 0000000..19aa98a Binary files /dev/null and b/10.4-IndexOf/obj/x86/Debug/10.4-IndexOf.pdb differ diff --git a/10.4-IndexOf/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/10.4-IndexOf/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.4-IndexOf/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/10.4-IndexOf/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.4-IndexOf/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/10.4-IndexOf/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.5-SubString/10.5-SubString.csproj b/10.5-SubString/10.5-SubString.csproj new file mode 100644 index 0000000..d10e50c --- /dev/null +++ b/10.5-SubString/10.5-SubString.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {DB5F3F12-05A8-4D79-A6DC-9100F24FA569} + Exe + SubString + 10.5-SubString + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/10.5-SubString/10.5-SubString.sln b/10.5-SubString/10.5-SubString.sln new file mode 100644 index 0000000..1d687d5 --- /dev/null +++ b/10.5-SubString/10.5-SubString.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "10.5-SubString", "10.5-SubString.csproj", "{DB5F3F12-05A8-4D79-A6DC-9100F24FA569}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DB5F3F12-05A8-4D79-A6DC-9100F24FA569}.Debug|x86.ActiveCfg = Debug|x86 + {DB5F3F12-05A8-4D79-A6DC-9100F24FA569}.Debug|x86.Build.0 = Debug|x86 + {DB5F3F12-05A8-4D79-A6DC-9100F24FA569}.Release|x86.ActiveCfg = Release|x86 + {DB5F3F12-05A8-4D79-A6DC-9100F24FA569}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/10.5-SubString/10.5-SubString.userprefs b/10.5-SubString/10.5-SubString.userprefs new file mode 100644 index 0000000..2bd0a23 --- /dev/null +++ b/10.5-SubString/10.5-SubString.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/10.5-SubString/SubString.cs b/10.5-SubString/SubString.cs new file mode 100644 index 0000000..073f916 --- /dev/null +++ b/10.5-SubString/SubString.cs @@ -0,0 +1,16 @@ +using System; + +class SubString { + public static void Main() { + string s1 = "C:/Users/Crille/Desktop/profilbild.jpg"; + + Console.WriteLine("Filandelse: " + s1.Substring(s1.Length - 3, 3)); + + int username_start = s1.IndexOf('/', 3) + 1; + int username_end = s1.IndexOf('/', username_start + 1); + int username_length = username_end - username_start; + + Console.WriteLine("Start: {0}, End: {1}, Length: {2}", username_start, username_end, username_length); + Console.WriteLine("Username: " + s1.Substring(username_start, username_length)); + } +} diff --git a/10.5-SubString/bin/Debug/10.5-SubString.exe b/10.5-SubString/bin/Debug/10.5-SubString.exe new file mode 100644 index 0000000..6c645ac Binary files /dev/null and b/10.5-SubString/bin/Debug/10.5-SubString.exe differ diff --git a/10.5-SubString/bin/Debug/10.5-SubString.pdb b/10.5-SubString/bin/Debug/10.5-SubString.pdb new file mode 100644 index 0000000..81c90c0 Binary files /dev/null and b/10.5-SubString/bin/Debug/10.5-SubString.pdb differ diff --git a/10.5-SubString/obj/x86/Debug/10.5-SubString.csproj.FileListAbsolute.txt b/10.5-SubString/obj/x86/Debug/10.5-SubString.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..5b4301b --- /dev/null +++ b/10.5-SubString/obj/x86/Debug/10.5-SubString.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\10.5-SubString\bin\Debug\10.5-SubString.exe +C:\Users\Crille\CSharp\10.5-SubString\bin\Debug\10.5-SubString.pdb +C:\Users\Crille\CSharp\10.5-SubString\obj\x86\Debug\10.5-SubString.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\10.5-SubString\obj\x86\Debug\10.5-SubString.exe +C:\Users\Crille\CSharp\10.5-SubString\obj\x86\Debug\10.5-SubString.pdb diff --git a/10.5-SubString/obj/x86/Debug/10.5-SubString.csprojResolveAssemblyReference.cache b/10.5-SubString/obj/x86/Debug/10.5-SubString.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/10.5-SubString/obj/x86/Debug/10.5-SubString.csprojResolveAssemblyReference.cache differ diff --git a/10.5-SubString/obj/x86/Debug/10.5-SubString.exe b/10.5-SubString/obj/x86/Debug/10.5-SubString.exe new file mode 100644 index 0000000..6c645ac Binary files /dev/null and b/10.5-SubString/obj/x86/Debug/10.5-SubString.exe differ diff --git a/10.5-SubString/obj/x86/Debug/10.5-SubString.pdb b/10.5-SubString/obj/x86/Debug/10.5-SubString.pdb new file mode 100644 index 0000000..81c90c0 Binary files /dev/null and b/10.5-SubString/obj/x86/Debug/10.5-SubString.pdb differ diff --git a/10.5-SubString/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/10.5-SubString/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.5-SubString/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/10.5-SubString/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.5-SubString/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/10.5-SubString/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.6-StringSplit/10.6-StringSplit.csproj b/10.6-StringSplit/10.6-StringSplit.csproj new file mode 100644 index 0000000..6db3743 --- /dev/null +++ b/10.6-StringSplit/10.6-StringSplit.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {214078D2-FCAA-4D23-B866-ED22A641B0B3} + Exe + StringSplit + 10.6-StringSplit + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/10.6-StringSplit/10.6-StringSplit.sln b/10.6-StringSplit/10.6-StringSplit.sln new file mode 100644 index 0000000..be32bfd --- /dev/null +++ b/10.6-StringSplit/10.6-StringSplit.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "10.6-StringSplit", "10.6-StringSplit.csproj", "{214078D2-FCAA-4D23-B866-ED22A641B0B3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {214078D2-FCAA-4D23-B866-ED22A641B0B3}.Debug|x86.ActiveCfg = Debug|x86 + {214078D2-FCAA-4D23-B866-ED22A641B0B3}.Debug|x86.Build.0 = Debug|x86 + {214078D2-FCAA-4D23-B866-ED22A641B0B3}.Release|x86.ActiveCfg = Release|x86 + {214078D2-FCAA-4D23-B866-ED22A641B0B3}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/10.6-StringSplit/10.6-StringSplit.userprefs b/10.6-StringSplit/10.6-StringSplit.userprefs new file mode 100644 index 0000000..e939dae --- /dev/null +++ b/10.6-StringSplit/10.6-StringSplit.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/10.6-StringSplit/StringSplit.cs b/10.6-StringSplit/StringSplit.cs new file mode 100644 index 0000000..8ae8eef --- /dev/null +++ b/10.6-StringSplit/StringSplit.cs @@ -0,0 +1,13 @@ +using System; + +class StringSplit { + public static void Main() { + string listOfBeers = "Guinness, Vesper Ale, Dales Pale Ale, Snowcat, Punk IPA"; + char[] separators = new char[] { ',' }; + string[] beersArr = listOfBeers.Split(separators); + + foreach (var item in beersArr) { + Console.WriteLine(item); + } + } +} diff --git a/10.6-StringSplit/bin/Debug/10.6-StringSplit.exe b/10.6-StringSplit/bin/Debug/10.6-StringSplit.exe new file mode 100644 index 0000000..3cad3de Binary files /dev/null and b/10.6-StringSplit/bin/Debug/10.6-StringSplit.exe differ diff --git a/10.6-StringSplit/bin/Debug/10.6-StringSplit.pdb b/10.6-StringSplit/bin/Debug/10.6-StringSplit.pdb new file mode 100644 index 0000000..4a3f5d5 Binary files /dev/null and b/10.6-StringSplit/bin/Debug/10.6-StringSplit.pdb differ diff --git a/10.6-StringSplit/obj/x86/Debug/10.6-StringSplit.csproj.FileListAbsolute.txt b/10.6-StringSplit/obj/x86/Debug/10.6-StringSplit.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..f5265cf --- /dev/null +++ b/10.6-StringSplit/obj/x86/Debug/10.6-StringSplit.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\10.6-StringSplit\obj\x86\Debug\10.6-StringSplit.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\10.6-StringSplit\bin\Debug\10.6-StringSplit.exe +C:\Users\Crille\CSharp\10.6-StringSplit\bin\Debug\10.6-StringSplit.pdb +C:\Users\Crille\CSharp\10.6-StringSplit\obj\x86\Debug\10.6-StringSplit.exe +C:\Users\Crille\CSharp\10.6-StringSplit\obj\x86\Debug\10.6-StringSplit.pdb diff --git a/10.6-StringSplit/obj/x86/Debug/10.6-StringSplit.csprojResolveAssemblyReference.cache b/10.6-StringSplit/obj/x86/Debug/10.6-StringSplit.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/10.6-StringSplit/obj/x86/Debug/10.6-StringSplit.csprojResolveAssemblyReference.cache differ diff --git a/10.6-StringSplit/obj/x86/Debug/10.6-StringSplit.exe b/10.6-StringSplit/obj/x86/Debug/10.6-StringSplit.exe new file mode 100644 index 0000000..3cad3de Binary files /dev/null and b/10.6-StringSplit/obj/x86/Debug/10.6-StringSplit.exe differ diff --git a/10.6-StringSplit/obj/x86/Debug/10.6-StringSplit.pdb b/10.6-StringSplit/obj/x86/Debug/10.6-StringSplit.pdb new file mode 100644 index 0000000..4a3f5d5 Binary files /dev/null and b/10.6-StringSplit/obj/x86/Debug/10.6-StringSplit.pdb differ diff --git a/10.6-StringSplit/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/10.6-StringSplit/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.6-StringSplit/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/10.6-StringSplit/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.6-StringSplit/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/10.6-StringSplit/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.7-StringReverse/10.7-StringReverse.csproj b/10.7-StringReverse/10.7-StringReverse.csproj new file mode 100644 index 0000000..40e91b7 --- /dev/null +++ b/10.7-StringReverse/10.7-StringReverse.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {1D6A3D77-7186-4243-A742-05149B1FB561} + Exe + StringReverse + 10.7-StringReverse + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/10.7-StringReverse/10.7-StringReverse.sln b/10.7-StringReverse/10.7-StringReverse.sln new file mode 100644 index 0000000..ad9431d --- /dev/null +++ b/10.7-StringReverse/10.7-StringReverse.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "10.7-StringReverse", "10.7-StringReverse.csproj", "{1D6A3D77-7186-4243-A742-05149B1FB561}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1D6A3D77-7186-4243-A742-05149B1FB561}.Debug|x86.ActiveCfg = Debug|x86 + {1D6A3D77-7186-4243-A742-05149B1FB561}.Debug|x86.Build.0 = Debug|x86 + {1D6A3D77-7186-4243-A742-05149B1FB561}.Release|x86.ActiveCfg = Release|x86 + {1D6A3D77-7186-4243-A742-05149B1FB561}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/10.7-StringReverse/10.7-StringReverse.userprefs b/10.7-StringReverse/10.7-StringReverse.userprefs new file mode 100644 index 0000000..f36d01d --- /dev/null +++ b/10.7-StringReverse/10.7-StringReverse.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/10.7-StringReverse/StringReverse.cs b/10.7-StringReverse/StringReverse.cs new file mode 100644 index 0000000..fbde5c6 --- /dev/null +++ b/10.7-StringReverse/StringReverse.cs @@ -0,0 +1,30 @@ +using System; + +class StringReverse { + public static void Main() { + string s = "Norrsken"; + string reversed; + + reversed = StupidReverse(s); + Console.WriteLine("StupidReverse: " + reversed); + + reversed = GoodReverse(s); + Console.WriteLine("GoodReverse: " + reversed); + } + + static string StupidReverse(string text) { + char[] charArray = text.ToCharArray(); + string reverse = String.Empty; + + for (int i = charArray.Length - 1; i >= 0; i--) { + reverse += charArray[i]; + } + return reverse; + } + + static string GoodReverse(string text) { + char[] charArray = text.ToCharArray(); + Array.Reverse(charArray); + return new string(charArray); + } +} diff --git a/10.7-StringReverse/bin/Debug/10.7-StringReverse.exe b/10.7-StringReverse/bin/Debug/10.7-StringReverse.exe new file mode 100644 index 0000000..9f4e302 Binary files /dev/null and b/10.7-StringReverse/bin/Debug/10.7-StringReverse.exe differ diff --git a/10.7-StringReverse/bin/Debug/10.7-StringReverse.pdb b/10.7-StringReverse/bin/Debug/10.7-StringReverse.pdb new file mode 100644 index 0000000..55da2c3 Binary files /dev/null and b/10.7-StringReverse/bin/Debug/10.7-StringReverse.pdb differ diff --git a/10.7-StringReverse/obj/x86/Debug/10.7-StringReverse.csproj.FileListAbsolute.txt b/10.7-StringReverse/obj/x86/Debug/10.7-StringReverse.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..a12e75e --- /dev/null +++ b/10.7-StringReverse/obj/x86/Debug/10.7-StringReverse.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\10.7-StringReverse\bin\Debug\10.7-StringReverse.exe +C:\Users\Crille\CSharp\10.7-StringReverse\bin\Debug\10.7-StringReverse.pdb +C:\Users\Crille\CSharp\10.7-StringReverse\obj\x86\Debug\10.7-StringReverse.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\10.7-StringReverse\obj\x86\Debug\10.7-StringReverse.exe +C:\Users\Crille\CSharp\10.7-StringReverse\obj\x86\Debug\10.7-StringReverse.pdb diff --git a/10.7-StringReverse/obj/x86/Debug/10.7-StringReverse.csprojResolveAssemblyReference.cache b/10.7-StringReverse/obj/x86/Debug/10.7-StringReverse.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/10.7-StringReverse/obj/x86/Debug/10.7-StringReverse.csprojResolveAssemblyReference.cache differ diff --git a/10.7-StringReverse/obj/x86/Debug/10.7-StringReverse.exe b/10.7-StringReverse/obj/x86/Debug/10.7-StringReverse.exe new file mode 100644 index 0000000..9f4e302 Binary files /dev/null and b/10.7-StringReverse/obj/x86/Debug/10.7-StringReverse.exe differ diff --git a/10.7-StringReverse/obj/x86/Debug/10.7-StringReverse.pdb b/10.7-StringReverse/obj/x86/Debug/10.7-StringReverse.pdb new file mode 100644 index 0000000..55da2c3 Binary files /dev/null and b/10.7-StringReverse/obj/x86/Debug/10.7-StringReverse.pdb differ diff --git a/10.7-StringReverse/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/10.7-StringReverse/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.7-StringReverse/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/10.7-StringReverse/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.7-StringReverse/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/10.7-StringReverse/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.8-Palindrome/10.8-Palindrome.csproj b/10.8-Palindrome/10.8-Palindrome.csproj new file mode 100644 index 0000000..36c58f2 --- /dev/null +++ b/10.8-Palindrome/10.8-Palindrome.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {0CCDDC01-C822-4D38-9719-39CCE0BE86F1} + Exe + Palindrome + 10.8-Palindrome + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/10.8-Palindrome/10.8-Palindrome.sln b/10.8-Palindrome/10.8-Palindrome.sln new file mode 100644 index 0000000..c3472c0 --- /dev/null +++ b/10.8-Palindrome/10.8-Palindrome.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "10.8-Palindrome", "10.8-Palindrome.csproj", "{0CCDDC01-C822-4D38-9719-39CCE0BE86F1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0CCDDC01-C822-4D38-9719-39CCE0BE86F1}.Debug|x86.ActiveCfg = Debug|x86 + {0CCDDC01-C822-4D38-9719-39CCE0BE86F1}.Debug|x86.Build.0 = Debug|x86 + {0CCDDC01-C822-4D38-9719-39CCE0BE86F1}.Release|x86.ActiveCfg = Release|x86 + {0CCDDC01-C822-4D38-9719-39CCE0BE86F1}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/10.8-Palindrome/10.8-Palindrome.userprefs b/10.8-Palindrome/10.8-Palindrome.userprefs new file mode 100644 index 0000000..8ab1d84 --- /dev/null +++ b/10.8-Palindrome/10.8-Palindrome.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/10.8-Palindrome/Palindrome.cs b/10.8-Palindrome/Palindrome.cs new file mode 100644 index 0000000..025c3ce --- /dev/null +++ b/10.8-Palindrome/Palindrome.cs @@ -0,0 +1,20 @@ +using System; + +class Palindrome { + public static void Main() { + string test = "Sallad i Dallas"; + + test = test.ToLower(); + Console.WriteLine("Ar texten \"{0}\" ett Palindrom?: {1}", test, isPalindrome(test)); + } + + static bool isPalindrome(string input) { + int length = input.Length; + + for (int i = 0; i < length / 2; i++) { + if (input[i] != input[length - i - 1]) + return false; + } + return true; + } +} diff --git a/10.8-Palindrome/bin/Debug/10.8-Palindrome.exe b/10.8-Palindrome/bin/Debug/10.8-Palindrome.exe new file mode 100644 index 0000000..5c8ebe4 Binary files /dev/null and b/10.8-Palindrome/bin/Debug/10.8-Palindrome.exe differ diff --git a/10.8-Palindrome/bin/Debug/10.8-Palindrome.pdb b/10.8-Palindrome/bin/Debug/10.8-Palindrome.pdb new file mode 100644 index 0000000..45ebab0 Binary files /dev/null and b/10.8-Palindrome/bin/Debug/10.8-Palindrome.pdb differ diff --git a/10.8-Palindrome/obj/x86/Debug/10.8-Palindrome.csproj.FileListAbsolute.txt b/10.8-Palindrome/obj/x86/Debug/10.8-Palindrome.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..1ee59b2 --- /dev/null +++ b/10.8-Palindrome/obj/x86/Debug/10.8-Palindrome.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\10.8-Palindrome\bin\Debug\10.8-Palindrome.exe +C:\Users\Crille\CSharp\10.8-Palindrome\bin\Debug\10.8-Palindrome.pdb +C:\Users\Crille\CSharp\10.8-Palindrome\obj\x86\Debug\10.8-Palindrome.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\10.8-Palindrome\obj\x86\Debug\10.8-Palindrome.exe +C:\Users\Crille\CSharp\10.8-Palindrome\obj\x86\Debug\10.8-Palindrome.pdb diff --git a/10.8-Palindrome/obj/x86/Debug/10.8-Palindrome.csprojResolveAssemblyReference.cache b/10.8-Palindrome/obj/x86/Debug/10.8-Palindrome.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/10.8-Palindrome/obj/x86/Debug/10.8-Palindrome.csprojResolveAssemblyReference.cache differ diff --git a/10.8-Palindrome/obj/x86/Debug/10.8-Palindrome.exe b/10.8-Palindrome/obj/x86/Debug/10.8-Palindrome.exe new file mode 100644 index 0000000..5c8ebe4 Binary files /dev/null and b/10.8-Palindrome/obj/x86/Debug/10.8-Palindrome.exe differ diff --git a/10.8-Palindrome/obj/x86/Debug/10.8-Palindrome.pdb b/10.8-Palindrome/obj/x86/Debug/10.8-Palindrome.pdb new file mode 100644 index 0000000..45ebab0 Binary files /dev/null and b/10.8-Palindrome/obj/x86/Debug/10.8-Palindrome.pdb differ diff --git a/10.8-Palindrome/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/10.8-Palindrome/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.8-Palindrome/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/10.8-Palindrome/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/10.8-Palindrome/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/10.8-Palindrome/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/11.1-Exceptions/11.1-Exceptions.csproj b/11.1-Exceptions/11.1-Exceptions.csproj new file mode 100644 index 0000000..f4ad16a --- /dev/null +++ b/11.1-Exceptions/11.1-Exceptions.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {AF70674E-61C1-4339-9E8F-01565900F023} + Exe + Exceptions + 11.1-Exceptions + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/11.1-Exceptions/11.1-Exceptions.sln b/11.1-Exceptions/11.1-Exceptions.sln new file mode 100644 index 0000000..ed7e23b --- /dev/null +++ b/11.1-Exceptions/11.1-Exceptions.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "11.1-Exceptions", "11.1-Exceptions.csproj", "{AF70674E-61C1-4339-9E8F-01565900F023}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AF70674E-61C1-4339-9E8F-01565900F023}.Debug|x86.ActiveCfg = Debug|x86 + {AF70674E-61C1-4339-9E8F-01565900F023}.Debug|x86.Build.0 = Debug|x86 + {AF70674E-61C1-4339-9E8F-01565900F023}.Release|x86.ActiveCfg = Release|x86 + {AF70674E-61C1-4339-9E8F-01565900F023}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/11.1-Exceptions/11.1-Exceptions.userprefs b/11.1-Exceptions/11.1-Exceptions.userprefs new file mode 100644 index 0000000..f0756fc --- /dev/null +++ b/11.1-Exceptions/11.1-Exceptions.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/11.1-Exceptions/Exceptions.cs b/11.1-Exceptions/Exceptions.cs new file mode 100644 index 0000000..c2510eb --- /dev/null +++ b/11.1-Exceptions/Exceptions.cs @@ -0,0 +1,26 @@ +using System; + +class Exceptions { + public static void Main() { + int[] arr = new int[5]; + + for (int i = 0; i < 5; i++) { + arr[i] = i * 2; + } + Console.WriteLine("Innehallet i arrayen"); + + try { + for (int i = 0; i < 10; i++) { + Console.WriteLine("Array[{0}]: {1}", i, arr[i]); + } + } + catch (IndexOutOfRangeException iob) { + Console.WriteLine("Du vet val att man inte kan loopa utanfor en array?"); + Console.WriteLine(iob); + } + catch (Exception ex) { + Console.WriteLine("Nagot bidde fel"); + Console.WriteLine(ex); + } + } +} diff --git a/11.1-Exceptions/bin/Debug/11.1-Exceptions.exe b/11.1-Exceptions/bin/Debug/11.1-Exceptions.exe new file mode 100644 index 0000000..ae7305c Binary files /dev/null and b/11.1-Exceptions/bin/Debug/11.1-Exceptions.exe differ diff --git a/11.1-Exceptions/bin/Debug/11.1-Exceptions.pdb b/11.1-Exceptions/bin/Debug/11.1-Exceptions.pdb new file mode 100644 index 0000000..5f08f8b Binary files /dev/null and b/11.1-Exceptions/bin/Debug/11.1-Exceptions.pdb differ diff --git a/11.1-Exceptions/obj/x86/Debug/11.1-Exceptions.csproj.FileListAbsolute.txt b/11.1-Exceptions/obj/x86/Debug/11.1-Exceptions.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..adcb6ae --- /dev/null +++ b/11.1-Exceptions/obj/x86/Debug/11.1-Exceptions.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\11.1-Exceptions\bin\Debug\11.1-Exceptions.exe +C:\Users\Crille\CSharp\11.1-Exceptions\bin\Debug\11.1-Exceptions.pdb +C:\Users\Crille\CSharp\11.1-Exceptions\obj\x86\Debug\11.1-Exceptions.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\11.1-Exceptions\obj\x86\Debug\11.1-Exceptions.exe +C:\Users\Crille\CSharp\11.1-Exceptions\obj\x86\Debug\11.1-Exceptions.pdb diff --git a/11.1-Exceptions/obj/x86/Debug/11.1-Exceptions.csprojResolveAssemblyReference.cache b/11.1-Exceptions/obj/x86/Debug/11.1-Exceptions.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/11.1-Exceptions/obj/x86/Debug/11.1-Exceptions.csprojResolveAssemblyReference.cache differ diff --git a/11.1-Exceptions/obj/x86/Debug/11.1-Exceptions.exe b/11.1-Exceptions/obj/x86/Debug/11.1-Exceptions.exe new file mode 100644 index 0000000..ae7305c Binary files /dev/null and b/11.1-Exceptions/obj/x86/Debug/11.1-Exceptions.exe differ diff --git a/11.1-Exceptions/obj/x86/Debug/11.1-Exceptions.pdb b/11.1-Exceptions/obj/x86/Debug/11.1-Exceptions.pdb new file mode 100644 index 0000000..5f08f8b Binary files /dev/null and b/11.1-Exceptions/obj/x86/Debug/11.1-Exceptions.pdb differ diff --git a/11.1-Exceptions/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/11.1-Exceptions/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/11.1-Exceptions/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/11.1-Exceptions/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/11.1-Exceptions/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/11.1-Exceptions/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/11.2-DivByZero/11.2-DivByZero.csproj b/11.2-DivByZero/11.2-DivByZero.csproj new file mode 100644 index 0000000..1a2cf9a --- /dev/null +++ b/11.2-DivByZero/11.2-DivByZero.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {89BE40E8-1B03-4F87-A28D-7DE8F76AB7B3} + Exe + DivByZero + 11.2-DivByZero + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/11.2-DivByZero/11.2-DivByZero.sln b/11.2-DivByZero/11.2-DivByZero.sln new file mode 100644 index 0000000..7c0b534 --- /dev/null +++ b/11.2-DivByZero/11.2-DivByZero.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "11.2-DivByZero", "11.2-DivByZero.csproj", "{89BE40E8-1B03-4F87-A28D-7DE8F76AB7B3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {89BE40E8-1B03-4F87-A28D-7DE8F76AB7B3}.Debug|x86.ActiveCfg = Debug|x86 + {89BE40E8-1B03-4F87-A28D-7DE8F76AB7B3}.Debug|x86.Build.0 = Debug|x86 + {89BE40E8-1B03-4F87-A28D-7DE8F76AB7B3}.Release|x86.ActiveCfg = Release|x86 + {89BE40E8-1B03-4F87-A28D-7DE8F76AB7B3}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/11.2-DivByZero/11.2-DivByZero.userprefs b/11.2-DivByZero/11.2-DivByZero.userprefs new file mode 100644 index 0000000..1ef19bd --- /dev/null +++ b/11.2-DivByZero/11.2-DivByZero.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/11.2-DivByZero/DivByZero.cs b/11.2-DivByZero/DivByZero.cs new file mode 100644 index 0000000..4b29e50 --- /dev/null +++ b/11.2-DivByZero/DivByZero.cs @@ -0,0 +1,21 @@ +using System; + +class DivByZero { + public static void Main() { + float t = 5, n = 0, svar = 0; + + try { + if (n == 0) + throw new DivideByZeroException(); + svar = t / n; + Console.WriteLine("Svar: {0}", svar); + } + catch (DivideByZeroException dbz) { + Console.WriteLine("Du kan inte dela med 0! Larde du dig inget i 2:an???"); + Console.WriteLine(dbz); + } + finally { + Console.WriteLine("Finally kors alltid. Bra stalle att stada efter sig."); + } + } +} diff --git a/11.2-DivByZero/bin/Debug/11.2-DivByZero.exe b/11.2-DivByZero/bin/Debug/11.2-DivByZero.exe new file mode 100644 index 0000000..b197e1f Binary files /dev/null and b/11.2-DivByZero/bin/Debug/11.2-DivByZero.exe differ diff --git a/11.2-DivByZero/bin/Debug/11.2-DivByZero.pdb b/11.2-DivByZero/bin/Debug/11.2-DivByZero.pdb new file mode 100644 index 0000000..816aded Binary files /dev/null and b/11.2-DivByZero/bin/Debug/11.2-DivByZero.pdb differ diff --git a/11.2-DivByZero/obj/x86/Debug/11.2-DivByZero.csproj.FileListAbsolute.txt b/11.2-DivByZero/obj/x86/Debug/11.2-DivByZero.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..dff1599 --- /dev/null +++ b/11.2-DivByZero/obj/x86/Debug/11.2-DivByZero.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\11.2-DivByZero\bin\Debug\11.2-DivByZero.exe +C:\Users\Crille\CSharp\11.2-DivByZero\bin\Debug\11.2-DivByZero.pdb +C:\Users\Crille\CSharp\11.2-DivByZero\obj\x86\Debug\11.2-DivByZero.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\11.2-DivByZero\obj\x86\Debug\11.2-DivByZero.exe +C:\Users\Crille\CSharp\11.2-DivByZero\obj\x86\Debug\11.2-DivByZero.pdb diff --git a/11.2-DivByZero/obj/x86/Debug/11.2-DivByZero.csprojResolveAssemblyReference.cache b/11.2-DivByZero/obj/x86/Debug/11.2-DivByZero.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/11.2-DivByZero/obj/x86/Debug/11.2-DivByZero.csprojResolveAssemblyReference.cache differ diff --git a/11.2-DivByZero/obj/x86/Debug/11.2-DivByZero.exe b/11.2-DivByZero/obj/x86/Debug/11.2-DivByZero.exe new file mode 100644 index 0000000..b197e1f Binary files /dev/null and b/11.2-DivByZero/obj/x86/Debug/11.2-DivByZero.exe differ diff --git a/11.2-DivByZero/obj/x86/Debug/11.2-DivByZero.pdb b/11.2-DivByZero/obj/x86/Debug/11.2-DivByZero.pdb new file mode 100644 index 0000000..816aded Binary files /dev/null and b/11.2-DivByZero/obj/x86/Debug/11.2-DivByZero.pdb differ diff --git a/11.2-DivByZero/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/11.2-DivByZero/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/11.2-DivByZero/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/11.2-DivByZero/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/11.2-DivByZero/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/11.2-DivByZero/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/12.1-ReadFile/12.1-ReadFile.csproj b/12.1-ReadFile/12.1-ReadFile.csproj new file mode 100644 index 0000000..de3eaf4 --- /dev/null +++ b/12.1-ReadFile/12.1-ReadFile.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {DA9BCA48-DBB9-4488-98F2-87356CE4715F} + Exe + ReadFile + 12.1-ReadFile + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/12.1-ReadFile/12.1-ReadFile.sln b/12.1-ReadFile/12.1-ReadFile.sln new file mode 100644 index 0000000..c8b4930 --- /dev/null +++ b/12.1-ReadFile/12.1-ReadFile.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "12.1-ReadFile", "12.1-ReadFile.csproj", "{DA9BCA48-DBB9-4488-98F2-87356CE4715F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DA9BCA48-DBB9-4488-98F2-87356CE4715F}.Debug|x86.ActiveCfg = Debug|x86 + {DA9BCA48-DBB9-4488-98F2-87356CE4715F}.Debug|x86.Build.0 = Debug|x86 + {DA9BCA48-DBB9-4488-98F2-87356CE4715F}.Release|x86.ActiveCfg = Release|x86 + {DA9BCA48-DBB9-4488-98F2-87356CE4715F}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/12.1-ReadFile/12.1-ReadFile.userprefs b/12.1-ReadFile/12.1-ReadFile.userprefs new file mode 100644 index 0000000..00692ed --- /dev/null +++ b/12.1-ReadFile/12.1-ReadFile.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/12.1-ReadFile/ReadFile.cs b/12.1-ReadFile/ReadFile.cs new file mode 100644 index 0000000..4f65899 --- /dev/null +++ b/12.1-ReadFile/ReadFile.cs @@ -0,0 +1,19 @@ +using System; +using System.IO; + +class ReadFile { + public static void Main() { + StreamReader reader = new StreamReader("../../exempel.txt"); + int lineNumber = 0; + string line; + + // Läsa in alla rader i en fil + do { + line = reader.ReadLine(); + lineNumber++; + Console.WriteLine("Line:{0}: {1}", lineNumber, line); + } while(line != null); + + reader.Close(); + } +} diff --git a/12.1-ReadFile/bin/Debug/12.1-ReadFile.exe b/12.1-ReadFile/bin/Debug/12.1-ReadFile.exe new file mode 100644 index 0000000..2ebe74a Binary files /dev/null and b/12.1-ReadFile/bin/Debug/12.1-ReadFile.exe differ diff --git a/12.1-ReadFile/bin/Debug/12.1-ReadFile.pdb b/12.1-ReadFile/bin/Debug/12.1-ReadFile.pdb new file mode 100644 index 0000000..f188cab Binary files /dev/null and b/12.1-ReadFile/bin/Debug/12.1-ReadFile.pdb differ diff --git a/12.1-ReadFile/exempel.txt b/12.1-ReadFile/exempel.txt new file mode 100644 index 0000000..7632dad --- /dev/null +++ b/12.1-ReadFile/exempel.txt @@ -0,0 +1,4 @@ +Anna +Bertil +Catrin +David \ No newline at end of file diff --git a/12.1-ReadFile/obj/x86/Debug/12.1-ReadFile.csproj.FileListAbsolute.txt b/12.1-ReadFile/obj/x86/Debug/12.1-ReadFile.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..0e0307a --- /dev/null +++ b/12.1-ReadFile/obj/x86/Debug/12.1-ReadFile.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\12.1-ReadFile\bin\Debug\12.1-ReadFile.exe +C:\Users\Crille\CSharp\12.1-ReadFile\bin\Debug\12.1-ReadFile.pdb +C:\Users\Crille\CSharp\12.1-ReadFile\obj\x86\Debug\12.1-ReadFile.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\12.1-ReadFile\obj\x86\Debug\12.1-ReadFile.exe +C:\Users\Crille\CSharp\12.1-ReadFile\obj\x86\Debug\12.1-ReadFile.pdb diff --git a/12.1-ReadFile/obj/x86/Debug/12.1-ReadFile.csprojResolveAssemblyReference.cache b/12.1-ReadFile/obj/x86/Debug/12.1-ReadFile.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/12.1-ReadFile/obj/x86/Debug/12.1-ReadFile.csprojResolveAssemblyReference.cache differ diff --git a/12.1-ReadFile/obj/x86/Debug/12.1-ReadFile.exe b/12.1-ReadFile/obj/x86/Debug/12.1-ReadFile.exe new file mode 100644 index 0000000..2ebe74a Binary files /dev/null and b/12.1-ReadFile/obj/x86/Debug/12.1-ReadFile.exe differ diff --git a/12.1-ReadFile/obj/x86/Debug/12.1-ReadFile.pdb b/12.1-ReadFile/obj/x86/Debug/12.1-ReadFile.pdb new file mode 100644 index 0000000..f188cab Binary files /dev/null and b/12.1-ReadFile/obj/x86/Debug/12.1-ReadFile.pdb differ diff --git a/12.1-ReadFile/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/12.1-ReadFile/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/12.1-ReadFile/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/12.1-ReadFile/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/12.1-ReadFile/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/12.1-ReadFile/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/12.2-FileWriter/12.2-FileWriter.csproj b/12.2-FileWriter/12.2-FileWriter.csproj new file mode 100644 index 0000000..080e19f --- /dev/null +++ b/12.2-FileWriter/12.2-FileWriter.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {9B8CD4A6-98FC-44D1-AD7C-5B2795DE2E0F} + Exe + FileWriter + 12.2-FileWriter + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/12.2-FileWriter/12.2-FileWriter.sln b/12.2-FileWriter/12.2-FileWriter.sln new file mode 100644 index 0000000..bb5577f --- /dev/null +++ b/12.2-FileWriter/12.2-FileWriter.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "12.2-FileWriter", "12.2-FileWriter.csproj", "{9B8CD4A6-98FC-44D1-AD7C-5B2795DE2E0F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9B8CD4A6-98FC-44D1-AD7C-5B2795DE2E0F}.Debug|x86.ActiveCfg = Debug|x86 + {9B8CD4A6-98FC-44D1-AD7C-5B2795DE2E0F}.Debug|x86.Build.0 = Debug|x86 + {9B8CD4A6-98FC-44D1-AD7C-5B2795DE2E0F}.Release|x86.ActiveCfg = Release|x86 + {9B8CD4A6-98FC-44D1-AD7C-5B2795DE2E0F}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/12.2-FileWriter/12.2-FileWriter.userprefs b/12.2-FileWriter/12.2-FileWriter.userprefs new file mode 100644 index 0000000..8313078 --- /dev/null +++ b/12.2-FileWriter/12.2-FileWriter.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/12.2-FileWriter/FileWriter.cs b/12.2-FileWriter/FileWriter.cs new file mode 100644 index 0000000..ac08706 --- /dev/null +++ b/12.2-FileWriter/FileWriter.cs @@ -0,0 +1,19 @@ +using System; +using System.IO; + +class FileWriter { + public static void Main() { + StreamWriter writer = new StreamWriter("../../namn.txt"); + + writer.WriteLine("Anna"); + writer.WriteLine("Bertil"); + writer.WriteLine("Catrin"); + writer.WriteLine("David"); + writer.WriteLine("Estelle"); + writer.WriteLine("Fredrik"); + + writer.Close(); + + Console.WriteLine("Allt klart...."); + } +} diff --git a/12.2-FileWriter/bin/Debug/12.2-FileWriter.exe b/12.2-FileWriter/bin/Debug/12.2-FileWriter.exe new file mode 100644 index 0000000..1fd15ba Binary files /dev/null and b/12.2-FileWriter/bin/Debug/12.2-FileWriter.exe differ diff --git a/12.2-FileWriter/bin/Debug/12.2-FileWriter.pdb b/12.2-FileWriter/bin/Debug/12.2-FileWriter.pdb new file mode 100644 index 0000000..f9dd567 Binary files /dev/null and b/12.2-FileWriter/bin/Debug/12.2-FileWriter.pdb differ diff --git a/12.2-FileWriter/namn.txt b/12.2-FileWriter/namn.txt new file mode 100644 index 0000000..7c5a7e2 --- /dev/null +++ b/12.2-FileWriter/namn.txt @@ -0,0 +1,6 @@ +Anna +Bertil +Catrin +David +Estelle +Fredrik diff --git a/12.2-FileWriter/obj/x86/Debug/12.2-FileWriter.csproj.FileListAbsolute.txt b/12.2-FileWriter/obj/x86/Debug/12.2-FileWriter.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..118fdc3 --- /dev/null +++ b/12.2-FileWriter/obj/x86/Debug/12.2-FileWriter.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\12.2-FileWriter\bin\Debug\12.2-FileWriter.exe +C:\Users\Crille\CSharp\12.2-FileWriter\bin\Debug\12.2-FileWriter.pdb +C:\Users\Crille\CSharp\12.2-FileWriter\obj\x86\Debug\12.2-FileWriter.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\12.2-FileWriter\obj\x86\Debug\12.2-FileWriter.exe +C:\Users\Crille\CSharp\12.2-FileWriter\obj\x86\Debug\12.2-FileWriter.pdb diff --git a/12.2-FileWriter/obj/x86/Debug/12.2-FileWriter.csprojResolveAssemblyReference.cache b/12.2-FileWriter/obj/x86/Debug/12.2-FileWriter.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/12.2-FileWriter/obj/x86/Debug/12.2-FileWriter.csprojResolveAssemblyReference.cache differ diff --git a/12.2-FileWriter/obj/x86/Debug/12.2-FileWriter.exe b/12.2-FileWriter/obj/x86/Debug/12.2-FileWriter.exe new file mode 100644 index 0000000..1fd15ba Binary files /dev/null and b/12.2-FileWriter/obj/x86/Debug/12.2-FileWriter.exe differ diff --git a/12.2-FileWriter/obj/x86/Debug/12.2-FileWriter.pdb b/12.2-FileWriter/obj/x86/Debug/12.2-FileWriter.pdb new file mode 100644 index 0000000..f9dd567 Binary files /dev/null and b/12.2-FileWriter/obj/x86/Debug/12.2-FileWriter.pdb differ diff --git a/12.2-FileWriter/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/12.2-FileWriter/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/12.2-FileWriter/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/12.2-FileWriter/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/12.2-FileWriter/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/12.2-FileWriter/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/12.3-FileFind/12.3-FileFind.csproj b/12.3-FileFind/12.3-FileFind.csproj new file mode 100644 index 0000000..9f9bee9 --- /dev/null +++ b/12.3-FileFind/12.3-FileFind.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {2EEAC6FC-66AD-4B29-8B71-E71CFA048680} + Exe + FileFind + 12.3-FileFind + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/12.3-FileFind/12.3-FileFind.sln b/12.3-FileFind/12.3-FileFind.sln new file mode 100644 index 0000000..7a77dde --- /dev/null +++ b/12.3-FileFind/12.3-FileFind.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "12.3-FileFind", "12.3-FileFind.csproj", "{2EEAC6FC-66AD-4B29-8B71-E71CFA048680}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2EEAC6FC-66AD-4B29-8B71-E71CFA048680}.Debug|x86.ActiveCfg = Debug|x86 + {2EEAC6FC-66AD-4B29-8B71-E71CFA048680}.Debug|x86.Build.0 = Debug|x86 + {2EEAC6FC-66AD-4B29-8B71-E71CFA048680}.Release|x86.ActiveCfg = Release|x86 + {2EEAC6FC-66AD-4B29-8B71-E71CFA048680}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/12.3-FileFind/12.3-FileFind.userprefs b/12.3-FileFind/12.3-FileFind.userprefs new file mode 100644 index 0000000..59037b9 --- /dev/null +++ b/12.3-FileFind/12.3-FileFind.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/12.3-FileFind/FileFind.cs b/12.3-FileFind/FileFind.cs new file mode 100644 index 0000000..7f1a7cc --- /dev/null +++ b/12.3-FileFind/FileFind.cs @@ -0,0 +1,37 @@ +using System; +using System.IO; + +class FileFind { + public static void Main() { + string fileName = "../../bacon.txt"; + string word = "pork"; + + try { + StreamReader reader = new StreamReader(fileName); + int occurences = 0; + + string line = reader.ReadLine(); + + while (line != null) { + int index = line.IndexOf(word); + while (index != -1) { + occurences++; + index = line.IndexOf(word, (index + 1)); + } + line = reader.ReadLine(); + } + Console.WriteLine("Ordet \"{0}\" fanns med {1} i filen: {2}", word, occurences, fileName); + reader.Close(); + } + catch (FileNotFoundException fnf) { + Console.WriteLine("Kunde inte oppna filen: {0}", fileName); + Console.WriteLine(fnf); + } + catch (IOException ioex) { + Console.WriteLine("Kan inte lasa fran filen: {0}", fileName); + Console.WriteLine(ioex); + } + + Console.WriteLine("Allt klart..."); + } +} diff --git a/12.3-FileFind/bacon.txt b/12.3-FileFind/bacon.txt new file mode 100644 index 0000000..bc92786 --- /dev/null +++ b/12.3-FileFind/bacon.txt @@ -0,0 +1,17 @@ +Bacon ipsum dolor amet corned beef turducken sirloin shank +tenderloin jerky tongue venison salami chicken prosciutto +leberkas spare ribs shankle strip steak. Ball tip picanha +turducken prosciutto porchetta. Kevin ham hock shankle cow. +Turkey short ribs leberkas, chicken spare ribs corned beef +tongue tenderloin pork meatball turducken fatback bresaola. +Alcatra tenderloin ham hock landjaeger chicken ball tip +picanha andouille filet mignon short ribs strip steak. + +Tri-tip pork chop salami, strip steak flank tongue bacon +pancetta. Short ribs ham pig fatback. Tongue alcatra +venison swine, strip steak cupim chicken tri-tip fatback +turducken bresaola. Hamburger rump pork chop beef ribs +pancetta bresaola prosciutto turkey tri-tip tail. Meatloaf +jowl prosciutto landjaeger drumstick ham ham hock tongue +chuck turkey short ribs bresaola tail pastrami. Beef beef +ribs pork loin rump filet mignon buffalo salami. diff --git a/12.3-FileFind/bin/Debug/12.3-FileFind.exe b/12.3-FileFind/bin/Debug/12.3-FileFind.exe new file mode 100644 index 0000000..371b2b2 Binary files /dev/null and b/12.3-FileFind/bin/Debug/12.3-FileFind.exe differ diff --git a/12.3-FileFind/bin/Debug/12.3-FileFind.pdb b/12.3-FileFind/bin/Debug/12.3-FileFind.pdb new file mode 100644 index 0000000..f49e021 Binary files /dev/null and b/12.3-FileFind/bin/Debug/12.3-FileFind.pdb differ diff --git a/12.3-FileFind/obj/x86/Debug/12.3-FileFind.csproj.FileListAbsolute.txt b/12.3-FileFind/obj/x86/Debug/12.3-FileFind.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..113ac34 --- /dev/null +++ b/12.3-FileFind/obj/x86/Debug/12.3-FileFind.csproj.FileListAbsolute.txt @@ -0,0 +1,4 @@ +C:\Users\Crille\CSharp\12.3-FileFind\bin\Debug\12.3-FileFind.exe +C:\Users\Crille\CSharp\12.3-FileFind\bin\Debug\12.3-FileFind.pdb +C:\Users\Crille\CSharp\12.3-FileFind\obj\x86\Debug\12.3-FileFind.exe +C:\Users\Crille\CSharp\12.3-FileFind\obj\x86\Debug\12.3-FileFind.pdb diff --git a/12.3-FileFind/obj/x86/Debug/12.3-FileFind.exe b/12.3-FileFind/obj/x86/Debug/12.3-FileFind.exe new file mode 100644 index 0000000..371b2b2 Binary files /dev/null and b/12.3-FileFind/obj/x86/Debug/12.3-FileFind.exe differ diff --git a/12.3-FileFind/obj/x86/Debug/12.3-FileFind.pdb b/12.3-FileFind/obj/x86/Debug/12.3-FileFind.pdb new file mode 100644 index 0000000..f49e021 Binary files /dev/null and b/12.3-FileFind/obj/x86/Debug/12.3-FileFind.pdb differ diff --git a/12.3-FileFind/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/12.3-FileFind/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/12.3-FileFind/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/12.3-FileFind/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/12.3-FileFind/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/12.3-FileFind/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/13.1-Enkel_OOP/13.1-Enkel_OOP.csproj b/13.1-Enkel_OOP/13.1-Enkel_OOP.csproj new file mode 100644 index 0000000..2e33fb4 --- /dev/null +++ b/13.1-Enkel_OOP/13.1-Enkel_OOP.csproj @@ -0,0 +1,39 @@ + + + + Debug + x86 + {27285D0A-50CB-4CF2-94DE-309DDD1078EA} + Exe + Enkel_OOP + 13.1-Enkel_OOP + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + + + + \ No newline at end of file diff --git a/13.1-Enkel_OOP/13.1-Enkel_OOP.sln b/13.1-Enkel_OOP/13.1-Enkel_OOP.sln new file mode 100644 index 0000000..af62bca --- /dev/null +++ b/13.1-Enkel_OOP/13.1-Enkel_OOP.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "13.1-Enkel_OOP", "13.1-Enkel_OOP.csproj", "{27285D0A-50CB-4CF2-94DE-309DDD1078EA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {27285D0A-50CB-4CF2-94DE-309DDD1078EA}.Debug|x86.ActiveCfg = Debug|x86 + {27285D0A-50CB-4CF2-94DE-309DDD1078EA}.Debug|x86.Build.0 = Debug|x86 + {27285D0A-50CB-4CF2-94DE-309DDD1078EA}.Release|x86.ActiveCfg = Release|x86 + {27285D0A-50CB-4CF2-94DE-309DDD1078EA}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/13.1-Enkel_OOP/13.1-Enkel_OOP.userprefs b/13.1-Enkel_OOP/13.1-Enkel_OOP.userprefs new file mode 100644 index 0000000..116f97b --- /dev/null +++ b/13.1-Enkel_OOP/13.1-Enkel_OOP.userprefs @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/13.1-Enkel_OOP/Enkel_OOP.cs b/13.1-Enkel_OOP/Enkel_OOP.cs new file mode 100644 index 0000000..2a37d70 --- /dev/null +++ b/13.1-Enkel_OOP/Enkel_OOP.cs @@ -0,0 +1,20 @@ +using System; + +class Enkel_OOP { + public static void Main() { + Hund h = new Hund(); + Kanin k = new Kanin(); + Katt c = new Katt(); + + h.namn = "Fido"; + Console.WriteLine("Hunden heter: " + h.namn); + + k.setName("Bambi"); + Console.WriteLine("Kaninen heter: " + k.getName()); + + c.setName("Missen"); + Console.WriteLine("Katten heter: " + c.getName()); + + Console.WriteLine("Allt klart..."); + } +} diff --git a/13.1-Enkel_OOP/Hund.cs b/13.1-Enkel_OOP/Hund.cs new file mode 100644 index 0000000..768062d --- /dev/null +++ b/13.1-Enkel_OOP/Hund.cs @@ -0,0 +1,11 @@ +using System; + +public class Hund { + public string namn; + // FEL!!!!! + + public Hund() { + Console.WriteLine("Skapade en Hund"); + } +} + diff --git a/13.1-Enkel_OOP/Kanin.cs b/13.1-Enkel_OOP/Kanin.cs new file mode 100644 index 0000000..1a8436e --- /dev/null +++ b/13.1-Enkel_OOP/Kanin.cs @@ -0,0 +1,18 @@ +using System; + +public class Kanin { + private string namn; + + public Kanin() { + Console.WriteLine("Skapade en Kanin"); + } + + public string getName() { + return namn; + } + + public void setName(string n) { + namn = n; + } +} + diff --git a/13.1-Enkel_OOP/Katt.cs b/13.1-Enkel_OOP/Katt.cs new file mode 100644 index 0000000..cb2d8ab --- /dev/null +++ b/13.1-Enkel_OOP/Katt.cs @@ -0,0 +1,18 @@ +using System; + +public class Katt { + private string namn; + + public Katt() { + Console.WriteLine("Skapade en Katt"); + } + + public string getName() { + return namn; + } + + public void setName(string n) { + namn = n; + } +} + diff --git a/13.1-Enkel_OOP/bin/Debug/13.1-Enkel_OOP.exe b/13.1-Enkel_OOP/bin/Debug/13.1-Enkel_OOP.exe new file mode 100644 index 0000000..f344226 Binary files /dev/null and b/13.1-Enkel_OOP/bin/Debug/13.1-Enkel_OOP.exe differ diff --git a/13.1-Enkel_OOP/bin/Debug/13.1-Enkel_OOP.pdb b/13.1-Enkel_OOP/bin/Debug/13.1-Enkel_OOP.pdb new file mode 100644 index 0000000..a70ee30 Binary files /dev/null and b/13.1-Enkel_OOP/bin/Debug/13.1-Enkel_OOP.pdb differ diff --git a/13.1-Enkel_OOP/obj/x86/Debug/13.1-Enkel_OOP.csproj.FileListAbsolute.txt b/13.1-Enkel_OOP/obj/x86/Debug/13.1-Enkel_OOP.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..375cde9 --- /dev/null +++ b/13.1-Enkel_OOP/obj/x86/Debug/13.1-Enkel_OOP.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\13.1-Enkel_OOP\bin\Debug\13.1-Enkel_OOP.exe +C:\Users\Crille\CSharp\13.1-Enkel_OOP\bin\Debug\13.1-Enkel_OOP.pdb +C:\Users\Crille\CSharp\13.1-Enkel_OOP\obj\x86\Debug\13.1-Enkel_OOP.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\13.1-Enkel_OOP\obj\x86\Debug\13.1-Enkel_OOP.exe +C:\Users\Crille\CSharp\13.1-Enkel_OOP\obj\x86\Debug\13.1-Enkel_OOP.pdb diff --git a/13.1-Enkel_OOP/obj/x86/Debug/13.1-Enkel_OOP.csprojResolveAssemblyReference.cache b/13.1-Enkel_OOP/obj/x86/Debug/13.1-Enkel_OOP.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/13.1-Enkel_OOP/obj/x86/Debug/13.1-Enkel_OOP.csprojResolveAssemblyReference.cache differ diff --git a/13.1-Enkel_OOP/obj/x86/Debug/13.1-Enkel_OOP.exe b/13.1-Enkel_OOP/obj/x86/Debug/13.1-Enkel_OOP.exe new file mode 100644 index 0000000..f344226 Binary files /dev/null and b/13.1-Enkel_OOP/obj/x86/Debug/13.1-Enkel_OOP.exe differ diff --git a/13.1-Enkel_OOP/obj/x86/Debug/13.1-Enkel_OOP.pdb b/13.1-Enkel_OOP/obj/x86/Debug/13.1-Enkel_OOP.pdb new file mode 100644 index 0000000..a70ee30 Binary files /dev/null and b/13.1-Enkel_OOP/obj/x86/Debug/13.1-Enkel_OOP.pdb differ diff --git a/13.1-Enkel_OOP/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/13.1-Enkel_OOP/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/13.1-Enkel_OOP/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/13.1-Enkel_OOP/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/13.1-Enkel_OOP/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/13.1-Enkel_OOP/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/13.2-Superklass/13.2-Superklass.csproj b/13.2-Superklass/13.2-Superklass.csproj new file mode 100644 index 0000000..6307bed --- /dev/null +++ b/13.2-Superklass/13.2-Superklass.csproj @@ -0,0 +1,40 @@ + + + + Debug + x86 + {07032C30-0742-4CFB-AC86-BD575D1B6D84} + Exe + Superklass + 13.2-Superklass + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + + + + + \ No newline at end of file diff --git a/13.2-Superklass/13.2-Superklass.sln b/13.2-Superklass/13.2-Superklass.sln new file mode 100644 index 0000000..a448813 --- /dev/null +++ b/13.2-Superklass/13.2-Superklass.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "13.2-Superklass", "13.2-Superklass.csproj", "{07032C30-0742-4CFB-AC86-BD575D1B6D84}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {07032C30-0742-4CFB-AC86-BD575D1B6D84}.Debug|x86.ActiveCfg = Debug|x86 + {07032C30-0742-4CFB-AC86-BD575D1B6D84}.Debug|x86.Build.0 = Debug|x86 + {07032C30-0742-4CFB-AC86-BD575D1B6D84}.Release|x86.ActiveCfg = Release|x86 + {07032C30-0742-4CFB-AC86-BD575D1B6D84}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/13.2-Superklass/13.2-Superklass.userprefs b/13.2-Superklass/13.2-Superklass.userprefs new file mode 100644 index 0000000..a7af312 --- /dev/null +++ b/13.2-Superklass/13.2-Superklass.userprefs @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/13.2-Superklass/Hund.cs b/13.2-Superklass/Hund.cs new file mode 100644 index 0000000..e6b2197 --- /dev/null +++ b/13.2-Superklass/Hund.cs @@ -0,0 +1,10 @@ +using System; + +public class Hund : Husdjur { + + public void geLjud() { + Console.WriteLine("Hunden skaller"); + } + +} + diff --git a/13.2-Superklass/Husdjur.cs b/13.2-Superklass/Husdjur.cs new file mode 100644 index 0000000..8e651f5 --- /dev/null +++ b/13.2-Superklass/Husdjur.cs @@ -0,0 +1,23 @@ +using System; + +public class Husdjur { + private string namn; + private int vikt; + + public int getVikt() { + return vikt; + } + + public void setVikt(int v) { + vikt = v; + } + + public string getNamn() { + return namn; + } + + public void setNamn(string n) { + namn = n; + } +} + diff --git a/13.2-Superklass/Kanin.cs b/13.2-Superklass/Kanin.cs new file mode 100644 index 0000000..bfc9321 --- /dev/null +++ b/13.2-Superklass/Kanin.cs @@ -0,0 +1,12 @@ +using System; + +public class Kanin : Husdjur { + public void geLjud() { + Console.WriteLine("Kaninen later bara nar den ar radd"); + } + + public void idissla() { + Console.WriteLine("Kaninen tuggar som bara den..."); + } +} + diff --git a/13.2-Superklass/Katt.cs b/13.2-Superklass/Katt.cs new file mode 100644 index 0000000..34f2e51 --- /dev/null +++ b/13.2-Superklass/Katt.cs @@ -0,0 +1,9 @@ +using System; + +public class Katt : Husdjur { + public void geLjud() { + Console.WriteLine("Katten mjauar"); + } + +} + diff --git a/13.2-Superklass/Superklass.cs b/13.2-Superklass/Superklass.cs new file mode 100644 index 0000000..28b9bd4 --- /dev/null +++ b/13.2-Superklass/Superklass.cs @@ -0,0 +1,28 @@ +using System; + +class Superklass { + public static void Main() { + Hund h = new Hund(); + Kanin k = new Kanin(); + Katt c = new Katt(); + + h.setNamn("Fido"); + h.setVikt(18); + + k.setNamn("Bambi"); + k.setVikt(2); + + c.setNamn("Misse"); + c.setVikt(7); + + Console.WriteLine("Hunden {0} har vikten {1}kg", h.getNamn(), h.getVikt()); + Console.WriteLine("Kaninen {0} har vikten {1}kg", k.getNamn(), k.getVikt()); + Console.WriteLine("Katten {0} har vikten {1}kg", c.getNamn(), c.getVikt()); + + h.geLjud(); + k.geLjud(); + c.geLjud(); + + k.idissla(); + } +} diff --git a/13.2-Superklass/bin/Debug/13.2-Superklass.exe b/13.2-Superklass/bin/Debug/13.2-Superklass.exe new file mode 100644 index 0000000..68b69fa Binary files /dev/null and b/13.2-Superklass/bin/Debug/13.2-Superklass.exe differ diff --git a/13.2-Superklass/bin/Debug/13.2-Superklass.pdb b/13.2-Superklass/bin/Debug/13.2-Superklass.pdb new file mode 100644 index 0000000..0b87a54 Binary files /dev/null and b/13.2-Superklass/bin/Debug/13.2-Superklass.pdb differ diff --git a/13.2-Superklass/obj/x86/Debug/13.2-Superklass.csproj.FileListAbsolute.txt b/13.2-Superklass/obj/x86/Debug/13.2-Superklass.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..5b441ad --- /dev/null +++ b/13.2-Superklass/obj/x86/Debug/13.2-Superklass.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\13.2-Superklass\bin\Debug\13.2-Superklass.exe +C:\Users\Crille\CSharp\13.2-Superklass\bin\Debug\13.2-Superklass.pdb +C:\Users\Crille\CSharp\13.2-Superklass\obj\x86\Debug\13.2-Superklass.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\13.2-Superklass\obj\x86\Debug\13.2-Superklass.exe +C:\Users\Crille\CSharp\13.2-Superklass\obj\x86\Debug\13.2-Superklass.pdb diff --git a/13.2-Superklass/obj/x86/Debug/13.2-Superklass.csprojResolveAssemblyReference.cache b/13.2-Superklass/obj/x86/Debug/13.2-Superklass.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/13.2-Superklass/obj/x86/Debug/13.2-Superklass.csprojResolveAssemblyReference.cache differ diff --git a/13.2-Superklass/obj/x86/Debug/13.2-Superklass.exe b/13.2-Superklass/obj/x86/Debug/13.2-Superklass.exe new file mode 100644 index 0000000..68b69fa Binary files /dev/null and b/13.2-Superklass/obj/x86/Debug/13.2-Superklass.exe differ diff --git a/13.2-Superklass/obj/x86/Debug/13.2-Superklass.pdb b/13.2-Superklass/obj/x86/Debug/13.2-Superklass.pdb new file mode 100644 index 0000000..0b87a54 Binary files /dev/null and b/13.2-Superklass/obj/x86/Debug/13.2-Superklass.pdb differ diff --git a/13.2-Superklass/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/13.2-Superklass/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/13.2-Superklass/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/13.2-Superklass/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/13.2-Superklass/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/13.2-Superklass/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/2.1-DataTypes/2.1-DataTypes.csproj b/2.1-DataTypes/2.1-DataTypes.csproj new file mode 100644 index 0000000..595dafe --- /dev/null +++ b/2.1-DataTypes/2.1-DataTypes.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {80D73882-4940-46FE-9B64-C90F3C8D6663} + Exe + DataTypes + 2.1-DataTypes + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/2.1-DataTypes/2.1-DataTypes.sln b/2.1-DataTypes/2.1-DataTypes.sln new file mode 100644 index 0000000..091c917 --- /dev/null +++ b/2.1-DataTypes/2.1-DataTypes.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2.1-DataTypes", "2.1-DataTypes.csproj", "{80D73882-4940-46FE-9B64-C90F3C8D6663}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {80D73882-4940-46FE-9B64-C90F3C8D6663}.Debug|x86.ActiveCfg = Debug|x86 + {80D73882-4940-46FE-9B64-C90F3C8D6663}.Debug|x86.Build.0 = Debug|x86 + {80D73882-4940-46FE-9B64-C90F3C8D6663}.Release|x86.ActiveCfg = Release|x86 + {80D73882-4940-46FE-9B64-C90F3C8D6663}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/2.1-DataTypes/2.1-DataTypes.userprefs b/2.1-DataTypes/2.1-DataTypes.userprefs new file mode 100644 index 0000000..150aa17 --- /dev/null +++ b/2.1-DataTypes/2.1-DataTypes.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/2.1-DataTypes/DataTypes.cs b/2.1-DataTypes/DataTypes.cs new file mode 100644 index 0000000..d71cdff --- /dev/null +++ b/2.1-DataTypes/DataTypes.cs @@ -0,0 +1,17 @@ +using System; + +class DataTypes { + public static void Main() { + short litet = 5325; + int medel = 75475; + long stort = 5432432; + float pi = 3.14159f; + bool gubbe = true; + + Console.WriteLine("Litet: " + litet); + Console.WriteLine("Medel: " + medel); + Console.WriteLine("Stort: " + stort); + Console.WriteLine("Pi: " + pi); + Console.WriteLine("Gubbe: " + gubbe); + } +} diff --git a/2.1-DataTypes/bin/Debug/2.1-DataTypes.exe b/2.1-DataTypes/bin/Debug/2.1-DataTypes.exe new file mode 100644 index 0000000..3bb3f5b Binary files /dev/null and b/2.1-DataTypes/bin/Debug/2.1-DataTypes.exe differ diff --git a/2.1-DataTypes/bin/Debug/2.1-DataTypes.pdb b/2.1-DataTypes/bin/Debug/2.1-DataTypes.pdb new file mode 100644 index 0000000..0542934 Binary files /dev/null and b/2.1-DataTypes/bin/Debug/2.1-DataTypes.pdb differ diff --git a/2.1-DataTypes/obj/x86/Debug/2.1-DataTypes.csproj.FileListAbsolute.txt b/2.1-DataTypes/obj/x86/Debug/2.1-DataTypes.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..4cf7ee7 --- /dev/null +++ b/2.1-DataTypes/obj/x86/Debug/2.1-DataTypes.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\2.1-DataTypes\obj\x86\Debug\2.1-DataTypes.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\2.1-DataTypes\bin\Debug\2.1-DataTypes.exe +C:\Users\Crille\CSharp\2.1-DataTypes\bin\Debug\2.1-DataTypes.pdb +C:\Users\Crille\CSharp\2.1-DataTypes\obj\x86\Debug\2.1-DataTypes.exe +C:\Users\Crille\CSharp\2.1-DataTypes\obj\x86\Debug\2.1-DataTypes.pdb diff --git a/2.1-DataTypes/obj/x86/Debug/2.1-DataTypes.csprojResolveAssemblyReference.cache b/2.1-DataTypes/obj/x86/Debug/2.1-DataTypes.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/2.1-DataTypes/obj/x86/Debug/2.1-DataTypes.csprojResolveAssemblyReference.cache differ diff --git a/2.1-DataTypes/obj/x86/Debug/2.1-DataTypes.exe b/2.1-DataTypes/obj/x86/Debug/2.1-DataTypes.exe new file mode 100644 index 0000000..3bb3f5b Binary files /dev/null and b/2.1-DataTypes/obj/x86/Debug/2.1-DataTypes.exe differ diff --git a/2.1-DataTypes/obj/x86/Debug/2.1-DataTypes.pdb b/2.1-DataTypes/obj/x86/Debug/2.1-DataTypes.pdb new file mode 100644 index 0000000..0542934 Binary files /dev/null and b/2.1-DataTypes/obj/x86/Debug/2.1-DataTypes.pdb differ diff --git a/2.1-DataTypes/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/2.1-DataTypes/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/2.1-DataTypes/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/2.1-DataTypes/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/2.1-DataTypes/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/2.1-DataTypes/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/2.2-Strings/2.2-Strings.csproj b/2.2-Strings/2.2-Strings.csproj new file mode 100644 index 0000000..f9becb8 --- /dev/null +++ b/2.2-Strings/2.2-Strings.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {A40388D7-1E77-4A25-867F-E1ADDFCE9FE2} + Exe + Strings + 2.2-Strings + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/2.2-Strings/2.2-Strings.sln b/2.2-Strings/2.2-Strings.sln new file mode 100644 index 0000000..a0f6967 --- /dev/null +++ b/2.2-Strings/2.2-Strings.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2.2-Strings", "2.2-Strings.csproj", "{A40388D7-1E77-4A25-867F-E1ADDFCE9FE2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A40388D7-1E77-4A25-867F-E1ADDFCE9FE2}.Debug|x86.ActiveCfg = Debug|x86 + {A40388D7-1E77-4A25-867F-E1ADDFCE9FE2}.Debug|x86.Build.0 = Debug|x86 + {A40388D7-1E77-4A25-867F-E1ADDFCE9FE2}.Release|x86.ActiveCfg = Release|x86 + {A40388D7-1E77-4A25-867F-E1ADDFCE9FE2}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/2.2-Strings/2.2-Strings.userprefs b/2.2-Strings/2.2-Strings.userprefs new file mode 100644 index 0000000..3e5c62f --- /dev/null +++ b/2.2-Strings/2.2-Strings.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/2.2-Strings/Strings.cs b/2.2-Strings/Strings.cs new file mode 100644 index 0000000..d971355 --- /dev/null +++ b/2.2-Strings/Strings.cs @@ -0,0 +1,15 @@ +using System; + +class Strings { + public static void Main() { + string MyString = "This is my little string"; + char tecken = 'K'; + char ett = 'H'; + char tva = 'E'; + char tre = 'J'; + + Console.WriteLine("String: " + MyString); + Console.WriteLine("Tecken: " + tecken); + Console.WriteLine("Flera tecken: " + ett + tva + tre); + } +} diff --git a/2.2-Strings/bin/Debug/2.2-Strings.exe b/2.2-Strings/bin/Debug/2.2-Strings.exe new file mode 100644 index 0000000..7a998d4 Binary files /dev/null and b/2.2-Strings/bin/Debug/2.2-Strings.exe differ diff --git a/2.2-Strings/bin/Debug/2.2-Strings.pdb b/2.2-Strings/bin/Debug/2.2-Strings.pdb new file mode 100644 index 0000000..2e7be69 Binary files /dev/null and b/2.2-Strings/bin/Debug/2.2-Strings.pdb differ diff --git a/2.2-Strings/obj/x86/Debug/2.2-Strings.csproj.FileListAbsolute.txt b/2.2-Strings/obj/x86/Debug/2.2-Strings.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..211dcaa --- /dev/null +++ b/2.2-Strings/obj/x86/Debug/2.2-Strings.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\2.2-Strings\bin\Debug\2.2-Strings.exe +C:\Users\Crille\CSharp\2.2-Strings\bin\Debug\2.2-Strings.pdb +C:\Users\Crille\CSharp\2.2-Strings\obj\x86\Debug\2.2-Strings.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\2.2-Strings\obj\x86\Debug\2.2-Strings.exe +C:\Users\Crille\CSharp\2.2-Strings\obj\x86\Debug\2.2-Strings.pdb diff --git a/2.2-Strings/obj/x86/Debug/2.2-Strings.csprojResolveAssemblyReference.cache b/2.2-Strings/obj/x86/Debug/2.2-Strings.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/2.2-Strings/obj/x86/Debug/2.2-Strings.csprojResolveAssemblyReference.cache differ diff --git a/2.2-Strings/obj/x86/Debug/2.2-Strings.exe b/2.2-Strings/obj/x86/Debug/2.2-Strings.exe new file mode 100644 index 0000000..7a998d4 Binary files /dev/null and b/2.2-Strings/obj/x86/Debug/2.2-Strings.exe differ diff --git a/2.2-Strings/obj/x86/Debug/2.2-Strings.pdb b/2.2-Strings/obj/x86/Debug/2.2-Strings.pdb new file mode 100644 index 0000000..2e7be69 Binary files /dev/null and b/2.2-Strings/obj/x86/Debug/2.2-Strings.pdb differ diff --git a/2.2-Strings/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/2.2-Strings/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/2.2-Strings/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/2.2-Strings/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/2.2-Strings/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/2.2-Strings/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/3.1-Operatorer/3.1-Operatorer.csproj b/3.1-Operatorer/3.1-Operatorer.csproj new file mode 100644 index 0000000..d5f637d --- /dev/null +++ b/3.1-Operatorer/3.1-Operatorer.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {ED7EEDAF-99B2-4538-B084-CC5984A30F39} + Exe + Operatorer + 3.1-Operatorer + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/3.1-Operatorer/3.1-Operatorer.sln b/3.1-Operatorer/3.1-Operatorer.sln new file mode 100644 index 0000000..38c5189 --- /dev/null +++ b/3.1-Operatorer/3.1-Operatorer.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3.1-Operatorer", "3.1-Operatorer.csproj", "{ED7EEDAF-99B2-4538-B084-CC5984A30F39}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ED7EEDAF-99B2-4538-B084-CC5984A30F39}.Debug|x86.ActiveCfg = Debug|x86 + {ED7EEDAF-99B2-4538-B084-CC5984A30F39}.Debug|x86.Build.0 = Debug|x86 + {ED7EEDAF-99B2-4538-B084-CC5984A30F39}.Release|x86.ActiveCfg = Release|x86 + {ED7EEDAF-99B2-4538-B084-CC5984A30F39}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/3.1-Operatorer/3.1-Operatorer.userprefs b/3.1-Operatorer/3.1-Operatorer.userprefs new file mode 100644 index 0000000..70b318f --- /dev/null +++ b/3.1-Operatorer/3.1-Operatorer.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/3.1-Operatorer/Operatorer.cs b/3.1-Operatorer/Operatorer.cs new file mode 100644 index 0000000..fc4e7e3 --- /dev/null +++ b/3.1-Operatorer/Operatorer.cs @@ -0,0 +1,33 @@ +using System; + +class Operatorer { + public static void Main() { + int a = 1; + float f = 45f; + /* + Console.WriteLine("Plus: {0}", 3 + 4); + Console.WriteLine("Plus: {0}", 3 - 4); + Console.WriteLine("Plus: {0}", 3 * 4); + Console.WriteLine("Plus: {0}", 3f / 4f); + */ + a += 5; + //Console.WriteLine("A: " + a); + a -= 5; + //Console.WriteLine("A: " + a); + a *= 5; + //Console.WriteLine("A: " + a); + a /= 5; + //Console.WriteLine("A: " + a); + + a = 5; + Console.WriteLine("A före: " + a); + Console.WriteLine("A efter: " + --a); + Console.WriteLine("A sist: " + a); + + /* + f /= 26; + Console.WriteLine("f: " + f); + Console.WriteLine("f: {0:0.000}", f); + */ + } +} diff --git a/3.1-Operatorer/bin/Debug/3.1-Operatorer.exe b/3.1-Operatorer/bin/Debug/3.1-Operatorer.exe new file mode 100644 index 0000000..88700f2 Binary files /dev/null and b/3.1-Operatorer/bin/Debug/3.1-Operatorer.exe differ diff --git a/3.1-Operatorer/bin/Debug/3.1-Operatorer.pdb b/3.1-Operatorer/bin/Debug/3.1-Operatorer.pdb new file mode 100644 index 0000000..246d822 Binary files /dev/null and b/3.1-Operatorer/bin/Debug/3.1-Operatorer.pdb differ diff --git a/3.1-Operatorer/obj/x86/Debug/3.1-Operatorer.csproj.FileListAbsolute.txt b/3.1-Operatorer/obj/x86/Debug/3.1-Operatorer.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..b0aa2f4 --- /dev/null +++ b/3.1-Operatorer/obj/x86/Debug/3.1-Operatorer.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\3.1-Operatorer\bin\Debug\3.1-Operatorer.exe +C:\Users\Crille\CSharp\3.1-Operatorer\bin\Debug\3.1-Operatorer.pdb +C:\Users\Crille\CSharp\3.1-Operatorer\obj\x86\Debug\3.1-Operatorer.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\3.1-Operatorer\obj\x86\Debug\3.1-Operatorer.exe +C:\Users\Crille\CSharp\3.1-Operatorer\obj\x86\Debug\3.1-Operatorer.pdb diff --git a/3.1-Operatorer/obj/x86/Debug/3.1-Operatorer.csprojResolveAssemblyReference.cache b/3.1-Operatorer/obj/x86/Debug/3.1-Operatorer.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/3.1-Operatorer/obj/x86/Debug/3.1-Operatorer.csprojResolveAssemblyReference.cache differ diff --git a/3.1-Operatorer/obj/x86/Debug/3.1-Operatorer.exe b/3.1-Operatorer/obj/x86/Debug/3.1-Operatorer.exe new file mode 100644 index 0000000..88700f2 Binary files /dev/null and b/3.1-Operatorer/obj/x86/Debug/3.1-Operatorer.exe differ diff --git a/3.1-Operatorer/obj/x86/Debug/3.1-Operatorer.pdb b/3.1-Operatorer/obj/x86/Debug/3.1-Operatorer.pdb new file mode 100644 index 0000000..246d822 Binary files /dev/null and b/3.1-Operatorer/obj/x86/Debug/3.1-Operatorer.pdb differ diff --git a/3.1-Operatorer/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/3.1-Operatorer/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/3.1-Operatorer/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/3.1-Operatorer/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/3.1-Operatorer/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/3.1-Operatorer/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/3.2-Comparison/3.2-Comparison.csproj b/3.2-Comparison/3.2-Comparison.csproj new file mode 100644 index 0000000..eb0dbf2 --- /dev/null +++ b/3.2-Comparison/3.2-Comparison.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {3BE2712E-4777-4A5B-A075-F09D065EE655} + Exe + Comparison + 3.2-Comparison + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/3.2-Comparison/3.2-Comparison.sln b/3.2-Comparison/3.2-Comparison.sln new file mode 100644 index 0000000..ef37949 --- /dev/null +++ b/3.2-Comparison/3.2-Comparison.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3.2-Comparison", "3.2-Comparison.csproj", "{3BE2712E-4777-4A5B-A075-F09D065EE655}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3BE2712E-4777-4A5B-A075-F09D065EE655}.Debug|x86.ActiveCfg = Debug|x86 + {3BE2712E-4777-4A5B-A075-F09D065EE655}.Debug|x86.Build.0 = Debug|x86 + {3BE2712E-4777-4A5B-A075-F09D065EE655}.Release|x86.ActiveCfg = Release|x86 + {3BE2712E-4777-4A5B-A075-F09D065EE655}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/3.2-Comparison/3.2-Comparison.userprefs b/3.2-Comparison/3.2-Comparison.userprefs new file mode 100644 index 0000000..db560ae --- /dev/null +++ b/3.2-Comparison/3.2-Comparison.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/3.2-Comparison/Comparison.cs b/3.2-Comparison/Comparison.cs new file mode 100644 index 0000000..15d1ed5 --- /dev/null +++ b/3.2-Comparison/Comparison.cs @@ -0,0 +1,18 @@ +using System; + +class Comparison { + public static void Main() { + int a = 10, b = 15, c = 5; + float f = 5.0000000001f; + + Console.WriteLine("a < b : {0}", a < b); + Console.WriteLine("a > b : {0}", a > b); + + Console.WriteLine("a == b : {0}", a == b); + Console.WriteLine("a != b : {0}", a != b); + + Console.WriteLine("b == a+c : {0}", b == a + c); + + Console.WriteLine("c == f : {0}", c == f); + } +} diff --git a/3.2-Comparison/bin/Debug/3.2-Comparison.exe b/3.2-Comparison/bin/Debug/3.2-Comparison.exe new file mode 100644 index 0000000..5245f3a Binary files /dev/null and b/3.2-Comparison/bin/Debug/3.2-Comparison.exe differ diff --git a/3.2-Comparison/bin/Debug/3.2-Comparison.pdb b/3.2-Comparison/bin/Debug/3.2-Comparison.pdb new file mode 100644 index 0000000..71a05a8 Binary files /dev/null and b/3.2-Comparison/bin/Debug/3.2-Comparison.pdb differ diff --git a/3.2-Comparison/obj/x86/Debug/3.2-Comparison.csproj.FileListAbsolute.txt b/3.2-Comparison/obj/x86/Debug/3.2-Comparison.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..92cda7a --- /dev/null +++ b/3.2-Comparison/obj/x86/Debug/3.2-Comparison.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\3.2-Comparison\bin\Debug\3.2-Comparison.exe +C:\Users\Crille\CSharp\3.2-Comparison\bin\Debug\3.2-Comparison.pdb +C:\Users\Crille\CSharp\3.2-Comparison\obj\x86\Debug\3.2-Comparison.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\3.2-Comparison\obj\x86\Debug\3.2-Comparison.exe +C:\Users\Crille\CSharp\3.2-Comparison\obj\x86\Debug\3.2-Comparison.pdb diff --git a/3.2-Comparison/obj/x86/Debug/3.2-Comparison.csprojResolveAssemblyReference.cache b/3.2-Comparison/obj/x86/Debug/3.2-Comparison.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/3.2-Comparison/obj/x86/Debug/3.2-Comparison.csprojResolveAssemblyReference.cache differ diff --git a/3.2-Comparison/obj/x86/Debug/3.2-Comparison.exe b/3.2-Comparison/obj/x86/Debug/3.2-Comparison.exe new file mode 100644 index 0000000..5245f3a Binary files /dev/null and b/3.2-Comparison/obj/x86/Debug/3.2-Comparison.exe differ diff --git a/3.2-Comparison/obj/x86/Debug/3.2-Comparison.pdb b/3.2-Comparison/obj/x86/Debug/3.2-Comparison.pdb new file mode 100644 index 0000000..71a05a8 Binary files /dev/null and b/3.2-Comparison/obj/x86/Debug/3.2-Comparison.pdb differ diff --git a/3.2-Comparison/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/3.2-Comparison/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/3.2-Comparison/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/3.2-Comparison/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/3.2-Comparison/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/3.2-Comparison/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/3.3-BinaryOP/3.3-BinaryOP.csproj b/3.3-BinaryOP/3.3-BinaryOP.csproj new file mode 100644 index 0000000..825451b --- /dev/null +++ b/3.3-BinaryOP/3.3-BinaryOP.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {7F3039D2-4B6D-45E3-9C96-6A3101D32982} + Exe + BinaryOP + 3.3-BinaryOP + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/3.3-BinaryOP/3.3-BinaryOP.sln b/3.3-BinaryOP/3.3-BinaryOP.sln new file mode 100644 index 0000000..c1b0e34 --- /dev/null +++ b/3.3-BinaryOP/3.3-BinaryOP.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3.3-BinaryOP", "3.3-BinaryOP.csproj", "{7F3039D2-4B6D-45E3-9C96-6A3101D32982}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7F3039D2-4B6D-45E3-9C96-6A3101D32982}.Debug|x86.ActiveCfg = Debug|x86 + {7F3039D2-4B6D-45E3-9C96-6A3101D32982}.Debug|x86.Build.0 = Debug|x86 + {7F3039D2-4B6D-45E3-9C96-6A3101D32982}.Release|x86.ActiveCfg = Release|x86 + {7F3039D2-4B6D-45E3-9C96-6A3101D32982}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/3.3-BinaryOP/3.3-BinaryOP.userprefs b/3.3-BinaryOP/3.3-BinaryOP.userprefs new file mode 100644 index 0000000..31b8829 --- /dev/null +++ b/3.3-BinaryOP/3.3-BinaryOP.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/3.3-BinaryOP/BinaryOP.cs b/3.3-BinaryOP/BinaryOP.cs new file mode 100644 index 0000000..f4a2e84 --- /dev/null +++ b/3.3-BinaryOP/BinaryOP.cs @@ -0,0 +1,25 @@ +using System; + +class BinaryOP { + static void printBinary(byte tal) { + Console.WriteLine("Talet: 0x{0}", Convert.ToString(tal, 2).PadLeft(8, '0')); + } + + public static void Main() { + byte tal = 54; // 0011 0110 = 54 + byte a = 3; // 0000 0011 = 3 + byte b = 5; // 0000 0101 = 5 + + printBinary(tal); + + Console.WriteLine(a | b); // 0000 0111 = 7 + Console.WriteLine(a & b); // 0000 0001 = 1 + Console.WriteLine(a ^ b); // 0000 0110 = 6 + Console.WriteLine(~a & b); // 0000 0100 = 4 + Console.WriteLine(a << 1); // 0000 0110 = 6 + Console.WriteLine(a << 2); // 0000 1100 = 12 + Console.WriteLine(a >> 1); // 0000 0001 = 1 + + + } +} diff --git a/3.3-BinaryOP/bin/Debug/3.3-BinaryOP.exe b/3.3-BinaryOP/bin/Debug/3.3-BinaryOP.exe new file mode 100644 index 0000000..c1c2ffe Binary files /dev/null and b/3.3-BinaryOP/bin/Debug/3.3-BinaryOP.exe differ diff --git a/3.3-BinaryOP/bin/Debug/3.3-BinaryOP.pdb b/3.3-BinaryOP/bin/Debug/3.3-BinaryOP.pdb new file mode 100644 index 0000000..1d6553d Binary files /dev/null and b/3.3-BinaryOP/bin/Debug/3.3-BinaryOP.pdb differ diff --git a/3.3-BinaryOP/obj/x86/Debug/3.3-BinaryOP.csproj.FileListAbsolute.txt b/3.3-BinaryOP/obj/x86/Debug/3.3-BinaryOP.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..50b2791 --- /dev/null +++ b/3.3-BinaryOP/obj/x86/Debug/3.3-BinaryOP.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\3.3-BinaryOP\bin\Debug\3.3-BinaryOP.exe +C:\Users\Crille\CSharp\3.3-BinaryOP\bin\Debug\3.3-BinaryOP.pdb +C:\Users\Crille\CSharp\3.3-BinaryOP\obj\x86\Debug\3.3-BinaryOP.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\3.3-BinaryOP\obj\x86\Debug\3.3-BinaryOP.exe +C:\Users\Crille\CSharp\3.3-BinaryOP\obj\x86\Debug\3.3-BinaryOP.pdb diff --git a/3.3-BinaryOP/obj/x86/Debug/3.3-BinaryOP.csprojResolveAssemblyReference.cache b/3.3-BinaryOP/obj/x86/Debug/3.3-BinaryOP.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/3.3-BinaryOP/obj/x86/Debug/3.3-BinaryOP.csprojResolveAssemblyReference.cache differ diff --git a/3.3-BinaryOP/obj/x86/Debug/3.3-BinaryOP.exe b/3.3-BinaryOP/obj/x86/Debug/3.3-BinaryOP.exe new file mode 100644 index 0000000..c1c2ffe Binary files /dev/null and b/3.3-BinaryOP/obj/x86/Debug/3.3-BinaryOP.exe differ diff --git a/3.3-BinaryOP/obj/x86/Debug/3.3-BinaryOP.pdb b/3.3-BinaryOP/obj/x86/Debug/3.3-BinaryOP.pdb new file mode 100644 index 0000000..1d6553d Binary files /dev/null and b/3.3-BinaryOP/obj/x86/Debug/3.3-BinaryOP.pdb differ diff --git a/3.3-BinaryOP/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/3.3-BinaryOP/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/3.3-BinaryOP/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/3.3-BinaryOP/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/3.3-BinaryOP/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/3.3-BinaryOP/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/3.4-TypKonverteringar/3.4-TypKonverteringar.csproj b/3.4-TypKonverteringar/3.4-TypKonverteringar.csproj new file mode 100644 index 0000000..e422b22 --- /dev/null +++ b/3.4-TypKonverteringar/3.4-TypKonverteringar.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {89CBEC00-46F4-4E9A-8AEA-60A2B9F3046D} + Exe + TypKonverteringar + 3.4-TypKonverteringar + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/3.4-TypKonverteringar/3.4-TypKonverteringar.sln b/3.4-TypKonverteringar/3.4-TypKonverteringar.sln new file mode 100644 index 0000000..b53f20d --- /dev/null +++ b/3.4-TypKonverteringar/3.4-TypKonverteringar.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "3.4-TypKonverteringar", "3.4-TypKonverteringar.csproj", "{89CBEC00-46F4-4E9A-8AEA-60A2B9F3046D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {89CBEC00-46F4-4E9A-8AEA-60A2B9F3046D}.Debug|x86.ActiveCfg = Debug|x86 + {89CBEC00-46F4-4E9A-8AEA-60A2B9F3046D}.Debug|x86.Build.0 = Debug|x86 + {89CBEC00-46F4-4E9A-8AEA-60A2B9F3046D}.Release|x86.ActiveCfg = Release|x86 + {89CBEC00-46F4-4E9A-8AEA-60A2B9F3046D}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/3.4-TypKonverteringar/3.4-TypKonverteringar.userprefs b/3.4-TypKonverteringar/3.4-TypKonverteringar.userprefs new file mode 100644 index 0000000..5e011d1 --- /dev/null +++ b/3.4-TypKonverteringar/3.4-TypKonverteringar.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/3.4-TypKonverteringar/TypKonverteringar.cs b/3.4-TypKonverteringar/TypKonverteringar.cs new file mode 100644 index 0000000..31f630f --- /dev/null +++ b/3.4-TypKonverteringar/TypKonverteringar.cs @@ -0,0 +1,24 @@ +using System; + +class TypKonverteringar { + public static void Main() { + string text = "Hejsan på dig lille vän"; + + Console.WriteLine("sizeof(int): {0}, typeof(int): {1}", sizeof(int), typeof(int)); + Console.WriteLine("sizeof(long): {0}, typeof(long): {1}", sizeof(long), typeof(long)); + Console.WriteLine("sizeof(byte): {0}, typeof(byte): {1}", sizeof(byte), typeof(byte)); + Console.WriteLine("sizeof(float): {0}, typeof(float): {1}", sizeof(float), typeof(float)); + Console.WriteLine("sizeof(double): {0}, typeof(double): {1}", sizeof(double), typeof(double)); + Console.WriteLine("sizeof(char): {0}, typeof(char): {1}", sizeof(char), typeof(char)); + + Console.WriteLine("String: " + text.Length); + + int i = 10; + float f = 17.5f; + Console.WriteLine("i+f={0}", i + f); + + int svar; + svar = i - (int)f; + Console.WriteLine("Svar: {0}", svar); + } +} diff --git a/3.4-TypKonverteringar/bin/Debug/3.4-TypKonverteringar.exe b/3.4-TypKonverteringar/bin/Debug/3.4-TypKonverteringar.exe new file mode 100644 index 0000000..269f228 Binary files /dev/null and b/3.4-TypKonverteringar/bin/Debug/3.4-TypKonverteringar.exe differ diff --git a/3.4-TypKonverteringar/bin/Debug/3.4-TypKonverteringar.pdb b/3.4-TypKonverteringar/bin/Debug/3.4-TypKonverteringar.pdb new file mode 100644 index 0000000..a8caa0f Binary files /dev/null and b/3.4-TypKonverteringar/bin/Debug/3.4-TypKonverteringar.pdb differ diff --git a/3.4-TypKonverteringar/obj/x86/Debug/3.4-TypKonverteringar.csproj.FileListAbsolute.txt b/3.4-TypKonverteringar/obj/x86/Debug/3.4-TypKonverteringar.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..4bb410c --- /dev/null +++ b/3.4-TypKonverteringar/obj/x86/Debug/3.4-TypKonverteringar.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\3.4-TypKonverteringar\bin\Debug\3.4-TypKonverteringar.exe +C:\Users\Crille\CSharp\3.4-TypKonverteringar\bin\Debug\3.4-TypKonverteringar.pdb +C:\Users\Crille\CSharp\3.4-TypKonverteringar\obj\x86\Debug\3.4-TypKonverteringar.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\3.4-TypKonverteringar\obj\x86\Debug\3.4-TypKonverteringar.exe +C:\Users\Crille\CSharp\3.4-TypKonverteringar\obj\x86\Debug\3.4-TypKonverteringar.pdb diff --git a/3.4-TypKonverteringar/obj/x86/Debug/3.4-TypKonverteringar.csprojResolveAssemblyReference.cache b/3.4-TypKonverteringar/obj/x86/Debug/3.4-TypKonverteringar.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/3.4-TypKonverteringar/obj/x86/Debug/3.4-TypKonverteringar.csprojResolveAssemblyReference.cache differ diff --git a/3.4-TypKonverteringar/obj/x86/Debug/3.4-TypKonverteringar.exe b/3.4-TypKonverteringar/obj/x86/Debug/3.4-TypKonverteringar.exe new file mode 100644 index 0000000..269f228 Binary files /dev/null and b/3.4-TypKonverteringar/obj/x86/Debug/3.4-TypKonverteringar.exe differ diff --git a/3.4-TypKonverteringar/obj/x86/Debug/3.4-TypKonverteringar.pdb b/3.4-TypKonverteringar/obj/x86/Debug/3.4-TypKonverteringar.pdb new file mode 100644 index 0000000..a8caa0f Binary files /dev/null and b/3.4-TypKonverteringar/obj/x86/Debug/3.4-TypKonverteringar.pdb differ diff --git a/3.4-TypKonverteringar/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/3.4-TypKonverteringar/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/3.4-TypKonverteringar/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/3.4-TypKonverteringar/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/3.4-TypKonverteringar/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/3.4-TypKonverteringar/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.1-Enkel_Funktion/9.1-Enkel_Funktion.csproj b/9.1-Enkel_Funktion/9.1-Enkel_Funktion.csproj new file mode 100644 index 0000000..54bb808 --- /dev/null +++ b/9.1-Enkel_Funktion/9.1-Enkel_Funktion.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {F7AD8585-0E03-4980-8C5D-BAC8BC479E8F} + Exe + Enkel_Funktion + 9.1-Enkel_Funktion + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/9.1-Enkel_Funktion/9.1-Enkel_Funktion.sln b/9.1-Enkel_Funktion/9.1-Enkel_Funktion.sln new file mode 100644 index 0000000..8a977f0 --- /dev/null +++ b/9.1-Enkel_Funktion/9.1-Enkel_Funktion.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "9.1-Enkel_Funktion", "9.1-Enkel_Funktion.csproj", "{F7AD8585-0E03-4980-8C5D-BAC8BC479E8F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F7AD8585-0E03-4980-8C5D-BAC8BC479E8F}.Debug|x86.ActiveCfg = Debug|x86 + {F7AD8585-0E03-4980-8C5D-BAC8BC479E8F}.Debug|x86.Build.0 = Debug|x86 + {F7AD8585-0E03-4980-8C5D-BAC8BC479E8F}.Release|x86.ActiveCfg = Release|x86 + {F7AD8585-0E03-4980-8C5D-BAC8BC479E8F}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/9.1-Enkel_Funktion/9.1-Enkel_Funktion.userprefs b/9.1-Enkel_Funktion/9.1-Enkel_Funktion.userprefs new file mode 100644 index 0000000..72ddbb6 --- /dev/null +++ b/9.1-Enkel_Funktion/9.1-Enkel_Funktion.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/9.1-Enkel_Funktion/Enkel_Funktion.cs b/9.1-Enkel_Funktion/Enkel_Funktion.cs new file mode 100644 index 0000000..2e3fa55 --- /dev/null +++ b/9.1-Enkel_Funktion/Enkel_Funktion.cs @@ -0,0 +1,23 @@ +using System; + +class Enkel_Funktion { + public static void PrintCompany() { + Console.WriteLine("==================================="); + Console.WriteLine("| Catrins Fruktaffar AB |"); + Console.WriteLine("| Hemgatan 1 |"); + Console.WriteLine("| 123 45 Bortistan |"); + Console.WriteLine("==================================="); + } + + public static void Main() { + Console.WriteLine("Nu skall vi anropa en funktion"); + + PrintCompany(); + + Console.WriteLine("funkar det en gang till?"); + for (int i = 0; i < 5; i++) { + Console.WriteLine("Anropar funktionen: " + i); + PrintCompany(); + } + } +} diff --git a/9.1-Enkel_Funktion/bin/Debug/9.1-Enkel_Funktion.exe b/9.1-Enkel_Funktion/bin/Debug/9.1-Enkel_Funktion.exe new file mode 100644 index 0000000..a4db8c0 Binary files /dev/null and b/9.1-Enkel_Funktion/bin/Debug/9.1-Enkel_Funktion.exe differ diff --git a/9.1-Enkel_Funktion/bin/Debug/9.1-Enkel_Funktion.pdb b/9.1-Enkel_Funktion/bin/Debug/9.1-Enkel_Funktion.pdb new file mode 100644 index 0000000..80b184f Binary files /dev/null and b/9.1-Enkel_Funktion/bin/Debug/9.1-Enkel_Funktion.pdb differ diff --git a/9.1-Enkel_Funktion/obj/x86/Debug/9.1-Enkel_Funktion.csproj.FileListAbsolute.txt b/9.1-Enkel_Funktion/obj/x86/Debug/9.1-Enkel_Funktion.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..a8cfbf3 --- /dev/null +++ b/9.1-Enkel_Funktion/obj/x86/Debug/9.1-Enkel_Funktion.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\9.1-Enkel_Funktion\bin\Debug\9.1-Enkel_Funktion.exe +C:\Users\Crille\CSharp\9.1-Enkel_Funktion\bin\Debug\9.1-Enkel_Funktion.pdb +C:\Users\Crille\CSharp\9.1-Enkel_Funktion\obj\x86\Debug\9.1-Enkel_Funktion.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\9.1-Enkel_Funktion\obj\x86\Debug\9.1-Enkel_Funktion.exe +C:\Users\Crille\CSharp\9.1-Enkel_Funktion\obj\x86\Debug\9.1-Enkel_Funktion.pdb diff --git a/9.1-Enkel_Funktion/obj/x86/Debug/9.1-Enkel_Funktion.csprojResolveAssemblyReference.cache b/9.1-Enkel_Funktion/obj/x86/Debug/9.1-Enkel_Funktion.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/9.1-Enkel_Funktion/obj/x86/Debug/9.1-Enkel_Funktion.csprojResolveAssemblyReference.cache differ diff --git a/9.1-Enkel_Funktion/obj/x86/Debug/9.1-Enkel_Funktion.exe b/9.1-Enkel_Funktion/obj/x86/Debug/9.1-Enkel_Funktion.exe new file mode 100644 index 0000000..a4db8c0 Binary files /dev/null and b/9.1-Enkel_Funktion/obj/x86/Debug/9.1-Enkel_Funktion.exe differ diff --git a/9.1-Enkel_Funktion/obj/x86/Debug/9.1-Enkel_Funktion.pdb b/9.1-Enkel_Funktion/obj/x86/Debug/9.1-Enkel_Funktion.pdb new file mode 100644 index 0000000..80b184f Binary files /dev/null and b/9.1-Enkel_Funktion/obj/x86/Debug/9.1-Enkel_Funktion.pdb differ diff --git a/9.1-Enkel_Funktion/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/9.1-Enkel_Funktion/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.1-Enkel_Funktion/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/9.1-Enkel_Funktion/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.1-Enkel_Funktion/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/9.1-Enkel_Funktion/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.2-Scope/9.2-Scope.csproj b/9.2-Scope/9.2-Scope.csproj new file mode 100644 index 0000000..1e71324 --- /dev/null +++ b/9.2-Scope/9.2-Scope.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {4F6F167C-497E-4B2B-92C3-DB9C3611C830} + Exe + Scope + 9.2-Scope + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/9.2-Scope/9.2-Scope.sln b/9.2-Scope/9.2-Scope.sln new file mode 100644 index 0000000..f361750 --- /dev/null +++ b/9.2-Scope/9.2-Scope.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "9.2-Scope", "9.2-Scope.csproj", "{4F6F167C-497E-4B2B-92C3-DB9C3611C830}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4F6F167C-497E-4B2B-92C3-DB9C3611C830}.Debug|x86.ActiveCfg = Debug|x86 + {4F6F167C-497E-4B2B-92C3-DB9C3611C830}.Debug|x86.Build.0 = Debug|x86 + {4F6F167C-497E-4B2B-92C3-DB9C3611C830}.Release|x86.ActiveCfg = Release|x86 + {4F6F167C-497E-4B2B-92C3-DB9C3611C830}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/9.2-Scope/9.2-Scope.userprefs b/9.2-Scope/9.2-Scope.userprefs new file mode 100644 index 0000000..adb076e --- /dev/null +++ b/9.2-Scope/9.2-Scope.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/9.2-Scope/Scope.cs b/9.2-Scope/Scope.cs new file mode 100644 index 0000000..5411af6 --- /dev/null +++ b/9.2-Scope/Scope.cs @@ -0,0 +1,33 @@ +using System; + +class Scope { + public static int classVar = 325; + + public static void do_something(int indata) { + Console.WriteLine("ClassVar i do_something: {0}", classVar); + Console.WriteLine("Indata: {0}", indata); + } + + public static void Main() { + int funkVar = 10; + + for (int i = 0; i < 4; i++) { + Console.WriteLine("Variabeln i={0}", i); + } + if (funkVar > 7) { + int ifVar = 65; + Console.WriteLine("ifVar:" + ifVar); + } + + Console.WriteLine("Funkvar: {0}", funkVar); + //Console.WriteLine("Raknaren i: {0}", i); + //Console.WriteLine("ifVar: {0}", ifVar); + //Console.WriteLine("SistVar: {0}", sistVar); + //int sistVar = 564; + Console.WriteLine("ClassVar: {0}", classVar); + + do_something(111); + + Console.WriteLine("Indata:{0}", indata); + } +} diff --git a/9.2-Scope/bin/Debug/9.2-Scope.exe b/9.2-Scope/bin/Debug/9.2-Scope.exe new file mode 100644 index 0000000..dc70b8a Binary files /dev/null and b/9.2-Scope/bin/Debug/9.2-Scope.exe differ diff --git a/9.2-Scope/bin/Debug/9.2-Scope.pdb b/9.2-Scope/bin/Debug/9.2-Scope.pdb new file mode 100644 index 0000000..0663fa3 Binary files /dev/null and b/9.2-Scope/bin/Debug/9.2-Scope.pdb differ diff --git a/9.2-Scope/obj/x86/Debug/9.2-Scope.csproj.FileListAbsolute.txt b/9.2-Scope/obj/x86/Debug/9.2-Scope.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..64f0354 --- /dev/null +++ b/9.2-Scope/obj/x86/Debug/9.2-Scope.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\9.2-Scope\bin\Debug\9.2-Scope.exe +C:\Users\Crille\CSharp\9.2-Scope\bin\Debug\9.2-Scope.pdb +C:\Users\Crille\CSharp\9.2-Scope\obj\x86\Debug\9.2-Scope.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\9.2-Scope\obj\x86\Debug\9.2-Scope.exe +C:\Users\Crille\CSharp\9.2-Scope\obj\x86\Debug\9.2-Scope.pdb diff --git a/9.2-Scope/obj/x86/Debug/9.2-Scope.csprojResolveAssemblyReference.cache b/9.2-Scope/obj/x86/Debug/9.2-Scope.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/9.2-Scope/obj/x86/Debug/9.2-Scope.csprojResolveAssemblyReference.cache differ diff --git a/9.2-Scope/obj/x86/Debug/9.2-Scope.exe b/9.2-Scope/obj/x86/Debug/9.2-Scope.exe new file mode 100644 index 0000000..dc70b8a Binary files /dev/null and b/9.2-Scope/obj/x86/Debug/9.2-Scope.exe differ diff --git a/9.2-Scope/obj/x86/Debug/9.2-Scope.pdb b/9.2-Scope/obj/x86/Debug/9.2-Scope.pdb new file mode 100644 index 0000000..0663fa3 Binary files /dev/null and b/9.2-Scope/obj/x86/Debug/9.2-Scope.pdb differ diff --git a/9.2-Scope/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/9.2-Scope/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.2-Scope/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/9.2-Scope/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.2-Scope/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/9.2-Scope/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.3-FunktionIndata/9.3-FunktionIndata.csproj b/9.3-FunktionIndata/9.3-FunktionIndata.csproj new file mode 100644 index 0000000..f0fcf98 --- /dev/null +++ b/9.3-FunktionIndata/9.3-FunktionIndata.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {8DE1C1FB-C305-4AA8-A1AA-FD75AA4078BC} + Exe + FunktionIndata + 9.3-FunktionIndata + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/9.3-FunktionIndata/9.3-FunktionIndata.sln b/9.3-FunktionIndata/9.3-FunktionIndata.sln new file mode 100644 index 0000000..e6c2a1c --- /dev/null +++ b/9.3-FunktionIndata/9.3-FunktionIndata.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "9.3-FunktionIndata", "9.3-FunktionIndata.csproj", "{8DE1C1FB-C305-4AA8-A1AA-FD75AA4078BC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8DE1C1FB-C305-4AA8-A1AA-FD75AA4078BC}.Debug|x86.ActiveCfg = Debug|x86 + {8DE1C1FB-C305-4AA8-A1AA-FD75AA4078BC}.Debug|x86.Build.0 = Debug|x86 + {8DE1C1FB-C305-4AA8-A1AA-FD75AA4078BC}.Release|x86.ActiveCfg = Release|x86 + {8DE1C1FB-C305-4AA8-A1AA-FD75AA4078BC}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/9.3-FunktionIndata/9.3-FunktionIndata.userprefs b/9.3-FunktionIndata/9.3-FunktionIndata.userprefs new file mode 100644 index 0000000..79b7c5f --- /dev/null +++ b/9.3-FunktionIndata/9.3-FunktionIndata.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/9.3-FunktionIndata/FunktionIndata.cs b/9.3-FunktionIndata/FunktionIndata.cs new file mode 100644 index 0000000..315a37e --- /dev/null +++ b/9.3-FunktionIndata/FunktionIndata.cs @@ -0,0 +1,13 @@ +using System; + +class FunktionIndata { + static void Main() { + summeraTal(10, 23); + } + + static void summeraTal(int tal_1, int tal_2) { + int summa = tal_1 + tal_2; + + Console.WriteLine("Summan av " + tal_1 + " + " + tal_2 + " = " + summa); + } +} diff --git a/9.3-FunktionIndata/bin/Debug/9.3-FunktionIndata.exe b/9.3-FunktionIndata/bin/Debug/9.3-FunktionIndata.exe new file mode 100644 index 0000000..8676ba4 Binary files /dev/null and b/9.3-FunktionIndata/bin/Debug/9.3-FunktionIndata.exe differ diff --git a/9.3-FunktionIndata/bin/Debug/9.3-FunktionIndata.pdb b/9.3-FunktionIndata/bin/Debug/9.3-FunktionIndata.pdb new file mode 100644 index 0000000..ff37034 Binary files /dev/null and b/9.3-FunktionIndata/bin/Debug/9.3-FunktionIndata.pdb differ diff --git a/9.3-FunktionIndata/obj/x86/Debug/9.3-FunktionIndata.csproj.FileListAbsolute.txt b/9.3-FunktionIndata/obj/x86/Debug/9.3-FunktionIndata.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..529b3a3 --- /dev/null +++ b/9.3-FunktionIndata/obj/x86/Debug/9.3-FunktionIndata.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\9.3-FunktionIndata\bin\Debug\9.3-FunktionIndata.exe +C:\Users\Crille\CSharp\9.3-FunktionIndata\bin\Debug\9.3-FunktionIndata.pdb +C:\Users\Crille\CSharp\9.3-FunktionIndata\obj\x86\Debug\9.3-FunktionIndata.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\9.3-FunktionIndata\obj\x86\Debug\9.3-FunktionIndata.exe +C:\Users\Crille\CSharp\9.3-FunktionIndata\obj\x86\Debug\9.3-FunktionIndata.pdb diff --git a/9.3-FunktionIndata/obj/x86/Debug/9.3-FunktionIndata.csprojResolveAssemblyReference.cache b/9.3-FunktionIndata/obj/x86/Debug/9.3-FunktionIndata.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/9.3-FunktionIndata/obj/x86/Debug/9.3-FunktionIndata.csprojResolveAssemblyReference.cache differ diff --git a/9.3-FunktionIndata/obj/x86/Debug/9.3-FunktionIndata.exe b/9.3-FunktionIndata/obj/x86/Debug/9.3-FunktionIndata.exe new file mode 100644 index 0000000..8676ba4 Binary files /dev/null and b/9.3-FunktionIndata/obj/x86/Debug/9.3-FunktionIndata.exe differ diff --git a/9.3-FunktionIndata/obj/x86/Debug/9.3-FunktionIndata.pdb b/9.3-FunktionIndata/obj/x86/Debug/9.3-FunktionIndata.pdb new file mode 100644 index 0000000..ff37034 Binary files /dev/null and b/9.3-FunktionIndata/obj/x86/Debug/9.3-FunktionIndata.pdb differ diff --git a/9.3-FunktionIndata/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/9.3-FunktionIndata/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.3-FunktionIndata/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/9.3-FunktionIndata/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.3-FunktionIndata/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/9.3-FunktionIndata/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.4-Hypotenusa/9.4-Hypotenusa.csproj b/9.4-Hypotenusa/9.4-Hypotenusa.csproj new file mode 100644 index 0000000..a3738c2 --- /dev/null +++ b/9.4-Hypotenusa/9.4-Hypotenusa.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {0240492D-FDE9-40CC-A2B4-83566BF63152} + Exe + Hypotenusa + 9.4-Hypotenusa + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/9.4-Hypotenusa/9.4-Hypotenusa.sln b/9.4-Hypotenusa/9.4-Hypotenusa.sln new file mode 100644 index 0000000..c5ed8bb --- /dev/null +++ b/9.4-Hypotenusa/9.4-Hypotenusa.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "9.4-Hypotenusa", "9.4-Hypotenusa.csproj", "{0240492D-FDE9-40CC-A2B4-83566BF63152}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0240492D-FDE9-40CC-A2B4-83566BF63152}.Debug|x86.ActiveCfg = Debug|x86 + {0240492D-FDE9-40CC-A2B4-83566BF63152}.Debug|x86.Build.0 = Debug|x86 + {0240492D-FDE9-40CC-A2B4-83566BF63152}.Release|x86.ActiveCfg = Release|x86 + {0240492D-FDE9-40CC-A2B4-83566BF63152}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/9.4-Hypotenusa/9.4-Hypotenusa.userprefs b/9.4-Hypotenusa/9.4-Hypotenusa.userprefs new file mode 100644 index 0000000..cff7526 --- /dev/null +++ b/9.4-Hypotenusa/9.4-Hypotenusa.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/9.4-Hypotenusa/Hypotenusa.cs b/9.4-Hypotenusa/Hypotenusa.cs new file mode 100644 index 0000000..727ffe6 --- /dev/null +++ b/9.4-Hypotenusa/Hypotenusa.cs @@ -0,0 +1,18 @@ +using System; + +class Hypotenusa { + public static void Main() { + double svaret; + + svaret = rakna_hypotenusa(3, 4); + + Console.WriteLine("Langsidan i triangeln blir: {0}", svaret); + } + + static double rakna_hypotenusa(double a, double b) { + double kvadrater = Math.Pow(a, 2) + Math.Pow(b, 2); + double sidan = Math.Sqrt(kvadrater); + + return sidan; + } +} diff --git a/9.4-Hypotenusa/bin/Debug/9.4-Hypotenusa.exe b/9.4-Hypotenusa/bin/Debug/9.4-Hypotenusa.exe new file mode 100644 index 0000000..7940b95 Binary files /dev/null and b/9.4-Hypotenusa/bin/Debug/9.4-Hypotenusa.exe differ diff --git a/9.4-Hypotenusa/bin/Debug/9.4-Hypotenusa.pdb b/9.4-Hypotenusa/bin/Debug/9.4-Hypotenusa.pdb new file mode 100644 index 0000000..84e97f7 Binary files /dev/null and b/9.4-Hypotenusa/bin/Debug/9.4-Hypotenusa.pdb differ diff --git a/9.4-Hypotenusa/obj/x86/Debug/9.4-Hypotenusa.csproj.FileListAbsolute.txt b/9.4-Hypotenusa/obj/x86/Debug/9.4-Hypotenusa.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..1007bf5 --- /dev/null +++ b/9.4-Hypotenusa/obj/x86/Debug/9.4-Hypotenusa.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\9.4-Hypotenusa\bin\Debug\9.4-Hypotenusa.exe +C:\Users\Crille\CSharp\9.4-Hypotenusa\bin\Debug\9.4-Hypotenusa.pdb +C:\Users\Crille\CSharp\9.4-Hypotenusa\obj\x86\Debug\9.4-Hypotenusa.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\9.4-Hypotenusa\obj\x86\Debug\9.4-Hypotenusa.exe +C:\Users\Crille\CSharp\9.4-Hypotenusa\obj\x86\Debug\9.4-Hypotenusa.pdb diff --git a/9.4-Hypotenusa/obj/x86/Debug/9.4-Hypotenusa.csprojResolveAssemblyReference.cache b/9.4-Hypotenusa/obj/x86/Debug/9.4-Hypotenusa.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/9.4-Hypotenusa/obj/x86/Debug/9.4-Hypotenusa.csprojResolveAssemblyReference.cache differ diff --git a/9.4-Hypotenusa/obj/x86/Debug/9.4-Hypotenusa.exe b/9.4-Hypotenusa/obj/x86/Debug/9.4-Hypotenusa.exe new file mode 100644 index 0000000..7940b95 Binary files /dev/null and b/9.4-Hypotenusa/obj/x86/Debug/9.4-Hypotenusa.exe differ diff --git a/9.4-Hypotenusa/obj/x86/Debug/9.4-Hypotenusa.pdb b/9.4-Hypotenusa/obj/x86/Debug/9.4-Hypotenusa.pdb new file mode 100644 index 0000000..84e97f7 Binary files /dev/null and b/9.4-Hypotenusa/obj/x86/Debug/9.4-Hypotenusa.pdb differ diff --git a/9.4-Hypotenusa/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/9.4-Hypotenusa/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.4-Hypotenusa/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/9.4-Hypotenusa/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.4-Hypotenusa/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/9.4-Hypotenusa/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.5-Overload/9.5-Overload.csproj b/9.5-Overload/9.5-Overload.csproj new file mode 100644 index 0000000..486769a --- /dev/null +++ b/9.5-Overload/9.5-Overload.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {092CE372-A9A4-4442-8711-83C18326F84C} + Exe + Overload + 9.5-Overload + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/9.5-Overload/9.5-Overload.sln b/9.5-Overload/9.5-Overload.sln new file mode 100644 index 0000000..4489eeb --- /dev/null +++ b/9.5-Overload/9.5-Overload.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "9.5-Overload", "9.5-Overload.csproj", "{092CE372-A9A4-4442-8711-83C18326F84C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {092CE372-A9A4-4442-8711-83C18326F84C}.Debug|x86.ActiveCfg = Debug|x86 + {092CE372-A9A4-4442-8711-83C18326F84C}.Debug|x86.Build.0 = Debug|x86 + {092CE372-A9A4-4442-8711-83C18326F84C}.Release|x86.ActiveCfg = Release|x86 + {092CE372-A9A4-4442-8711-83C18326F84C}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/9.5-Overload/9.5-Overload.userprefs b/9.5-Overload/9.5-Overload.userprefs new file mode 100644 index 0000000..dc21588 --- /dev/null +++ b/9.5-Overload/9.5-Overload.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/9.5-Overload/Overload.cs b/9.5-Overload/Overload.cs new file mode 100644 index 0000000..c8ac0d7 --- /dev/null +++ b/9.5-Overload/Overload.cs @@ -0,0 +1,26 @@ +using System; + +class Overload { + public static void Main() { + PrintInfo(); + PrintInfo(5); + PrintInfo(5, "Kalle"); + PrintInfo("Lisa", 5); + } + + static void PrintInfo() { + Console.WriteLine("Jag skriver inte ut nagot alls."); + } + + static void PrintInfo(int tal) { + Console.WriteLine("Ett tal: " + tal); + } + + static void PrintInfo(int tal, string namn) { + Console.WriteLine("Ett tal: " + tal + " och namnet:" + namn); + } + + static void PrintInfo(string namn, int tal) { + Console.WriteLine("Denna tar emot en strang: " + namn + " och talet: " + tal); + } +} diff --git a/9.5-Overload/bin/Debug/9.5-Overload.exe b/9.5-Overload/bin/Debug/9.5-Overload.exe new file mode 100644 index 0000000..6b358c6 Binary files /dev/null and b/9.5-Overload/bin/Debug/9.5-Overload.exe differ diff --git a/9.5-Overload/bin/Debug/9.5-Overload.pdb b/9.5-Overload/bin/Debug/9.5-Overload.pdb new file mode 100644 index 0000000..728b5f8 Binary files /dev/null and b/9.5-Overload/bin/Debug/9.5-Overload.pdb differ diff --git a/9.5-Overload/obj/x86/Debug/9.5-Overload.csproj.FileListAbsolute.txt b/9.5-Overload/obj/x86/Debug/9.5-Overload.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..ac49091 --- /dev/null +++ b/9.5-Overload/obj/x86/Debug/9.5-Overload.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\9.5-Overload\bin\Debug\9.5-Overload.exe +C:\Users\Crille\CSharp\9.5-Overload\bin\Debug\9.5-Overload.pdb +C:\Users\Crille\CSharp\9.5-Overload\obj\x86\Debug\9.5-Overload.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\9.5-Overload\obj\x86\Debug\9.5-Overload.exe +C:\Users\Crille\CSharp\9.5-Overload\obj\x86\Debug\9.5-Overload.pdb diff --git a/9.5-Overload/obj/x86/Debug/9.5-Overload.csprojResolveAssemblyReference.cache b/9.5-Overload/obj/x86/Debug/9.5-Overload.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/9.5-Overload/obj/x86/Debug/9.5-Overload.csprojResolveAssemblyReference.cache differ diff --git a/9.5-Overload/obj/x86/Debug/9.5-Overload.exe b/9.5-Overload/obj/x86/Debug/9.5-Overload.exe new file mode 100644 index 0000000..6b358c6 Binary files /dev/null and b/9.5-Overload/obj/x86/Debug/9.5-Overload.exe differ diff --git a/9.5-Overload/obj/x86/Debug/9.5-Overload.pdb b/9.5-Overload/obj/x86/Debug/9.5-Overload.pdb new file mode 100644 index 0000000..728b5f8 Binary files /dev/null and b/9.5-Overload/obj/x86/Debug/9.5-Overload.pdb differ diff --git a/9.5-Overload/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/9.5-Overload/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.5-Overload/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/9.5-Overload/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.5-Overload/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/9.5-Overload/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.6-BubbleSort/9.6-BubbleSort.csproj b/9.6-BubbleSort/9.6-BubbleSort.csproj new file mode 100644 index 0000000..446b67e --- /dev/null +++ b/9.6-BubbleSort/9.6-BubbleSort.csproj @@ -0,0 +1,36 @@ + + + + Debug + x86 + {3788011D-2FE6-456D-86EF-5506B7F9F0D3} + Exe + BubbleSort + 9.6-BubbleSort + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + x86 + + + full + true + bin\Release + prompt + 4 + false + x86 + + + + + + \ No newline at end of file diff --git a/9.6-BubbleSort/9.6-BubbleSort.sln b/9.6-BubbleSort/9.6-BubbleSort.sln new file mode 100644 index 0000000..009c069 --- /dev/null +++ b/9.6-BubbleSort/9.6-BubbleSort.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "9.6-BubbleSort", "9.6-BubbleSort.csproj", "{3788011D-2FE6-456D-86EF-5506B7F9F0D3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3788011D-2FE6-456D-86EF-5506B7F9F0D3}.Debug|x86.ActiveCfg = Debug|x86 + {3788011D-2FE6-456D-86EF-5506B7F9F0D3}.Debug|x86.Build.0 = Debug|x86 + {3788011D-2FE6-456D-86EF-5506B7F9F0D3}.Release|x86.ActiveCfg = Release|x86 + {3788011D-2FE6-456D-86EF-5506B7F9F0D3}.Release|x86.Build.0 = Release|x86 + EndGlobalSection +EndGlobal diff --git a/9.6-BubbleSort/9.6-BubbleSort.userprefs b/9.6-BubbleSort/9.6-BubbleSort.userprefs new file mode 100644 index 0000000..0c7bf46 --- /dev/null +++ b/9.6-BubbleSort/9.6-BubbleSort.userprefs @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/9.6-BubbleSort/BubbleSort.cs b/9.6-BubbleSort/BubbleSort.cs new file mode 100644 index 0000000..26af1e9 --- /dev/null +++ b/9.6-BubbleSort/BubbleSort.cs @@ -0,0 +1,43 @@ +using System; + +class BubbleSort { + const int SIZE = 10, MIN = 0, MAX = 100; + + public static void Main() { + Random rand = new Random(); + short[] myArray = new short[SIZE]; + + for (int i = 0; i < SIZE; i++) { + myArray[i] = (short)rand.Next(MIN, MAX); + } + + Console.WriteLine("--------- myArray fore sortering ------------"); + for (int i = 0; i < SIZE; i++) { + Console.WriteLine("myArray[{0}]= {1}", i, myArray[i]); + } + + myBubbleSort(myArray); + + Console.WriteLine("--------- myArray efter sortering ------------"); + for (int i = 0; i < SIZE; i++) { + Console.WriteLine("myArray[{0}]= {1}", i, myArray[i]); + } + } + + static void myBubbleSort(short[] arr) { + short temp = 0; + + for (int walker = 0; walker < arr.Length; walker++) { + for (int sorter = 0; sorter < arr.Length - 1; sorter++) { + if (arr[sorter] > arr[sorter + 1]) { + temp = arr[sorter + 1]; + arr[sorter + 1] = arr[sorter]; + arr[sorter] = temp; + } + } + } + } +} + + + diff --git a/9.6-BubbleSort/bin/Debug/9.6-BubbleSort.exe b/9.6-BubbleSort/bin/Debug/9.6-BubbleSort.exe new file mode 100644 index 0000000..90399a2 Binary files /dev/null and b/9.6-BubbleSort/bin/Debug/9.6-BubbleSort.exe differ diff --git a/9.6-BubbleSort/bin/Debug/9.6-BubbleSort.pdb b/9.6-BubbleSort/bin/Debug/9.6-BubbleSort.pdb new file mode 100644 index 0000000..592ff01 Binary files /dev/null and b/9.6-BubbleSort/bin/Debug/9.6-BubbleSort.pdb differ diff --git a/9.6-BubbleSort/obj/x86/Debug/9.6-BubbleSort.csproj.FileListAbsolute.txt b/9.6-BubbleSort/obj/x86/Debug/9.6-BubbleSort.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..eae40c4 --- /dev/null +++ b/9.6-BubbleSort/obj/x86/Debug/9.6-BubbleSort.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Crille\CSharp\9.6-BubbleSort\bin\Debug\9.6-BubbleSort.exe +C:\Users\Crille\CSharp\9.6-BubbleSort\bin\Debug\9.6-BubbleSort.pdb +C:\Users\Crille\CSharp\9.6-BubbleSort\obj\x86\Debug\9.6-BubbleSort.csprojResolveAssemblyReference.cache +C:\Users\Crille\CSharp\9.6-BubbleSort\obj\x86\Debug\9.6-BubbleSort.exe +C:\Users\Crille\CSharp\9.6-BubbleSort\obj\x86\Debug\9.6-BubbleSort.pdb diff --git a/9.6-BubbleSort/obj/x86/Debug/9.6-BubbleSort.csprojResolveAssemblyReference.cache b/9.6-BubbleSort/obj/x86/Debug/9.6-BubbleSort.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..c935082 Binary files /dev/null and b/9.6-BubbleSort/obj/x86/Debug/9.6-BubbleSort.csprojResolveAssemblyReference.cache differ diff --git a/9.6-BubbleSort/obj/x86/Debug/9.6-BubbleSort.exe b/9.6-BubbleSort/obj/x86/Debug/9.6-BubbleSort.exe new file mode 100644 index 0000000..90399a2 Binary files /dev/null and b/9.6-BubbleSort/obj/x86/Debug/9.6-BubbleSort.exe differ diff --git a/9.6-BubbleSort/obj/x86/Debug/9.6-BubbleSort.pdb b/9.6-BubbleSort/obj/x86/Debug/9.6-BubbleSort.pdb new file mode 100644 index 0000000..592ff01 Binary files /dev/null and b/9.6-BubbleSort/obj/x86/Debug/9.6-BubbleSort.pdb differ diff --git a/9.6-BubbleSort/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/9.6-BubbleSort/obj/x86/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.6-BubbleSort/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/9.6-BubbleSort/obj/x86/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/9.6-BubbleSort/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/9.6-BubbleSort/obj/x86/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md new file mode 100644 index 0000000..bc5b67f --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Introduktion till CSharp diff --git a/old_code.7z b/old_code.7z new file mode 100644 index 0000000..d6d5701 Binary files /dev/null and b/old_code.7z differ