diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..13a2e11 --- /dev/null +++ b/Program.cs @@ -0,0 +1,3 @@ +using Programmation_objet_TLESIO21.TD1; + +Td1.Launch(); diff --git a/Programmation objet TLESIO21.csproj b/Programmation objet TLESIO21.csproj new file mode 100644 index 0000000..c526893 --- /dev/null +++ b/Programmation objet TLESIO21.csproj @@ -0,0 +1,11 @@ + + + + Exe + net6.0 + Programmation_objet_TLESIO21 + enable + enable + + + diff --git a/Programmation objet TLESIO21.sln b/Programmation objet TLESIO21.sln new file mode 100644 index 0000000..6e8f3ac --- /dev/null +++ b/Programmation objet TLESIO21.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.32825.248 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Programmation objet TLESIO21", "Programmation objet TLESIO21.csproj", "{934A555A-9646-4CD6-8C66-58A6082B4700}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {934A555A-9646-4CD6-8C66-58A6082B4700}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {934A555A-9646-4CD6-8C66-58A6082B4700}.Debug|Any CPU.Build.0 = Debug|Any CPU + {934A555A-9646-4CD6-8C66-58A6082B4700}.Release|Any CPU.ActiveCfg = Release|Any CPU + {934A555A-9646-4CD6-8C66-58A6082B4700}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C38246C9-46A0-467B-AC5C-0DC635D2DDC5} + EndGlobalSection +EndGlobal diff --git a/TD1/td1.cs b/TD1/td1.cs new file mode 100644 index 0000000..ee09564 --- /dev/null +++ b/TD1/td1.cs @@ -0,0 +1,31 @@ +using System; + +namespace Programmation_objet_TLESIO21.TD1 { + public static class Td1 { + + private static void Excercice1(ref int a, ref int b) { + (a, b) = (b, a); + } + + private static void TestExcercice1() { + Console.Write("Saisir a : "); + String s = Console.ReadLine(); + int a = int.Parse(s); + + Console.Write("Saisir b : "); + s = Console.ReadLine(); + int b = int.Parse(s); + + + Console.WriteLine("Avant inversion, a = " + a + " & b = " + b); + Excercice1(ref a, ref b); + Console.WriteLine("Après inversion, a = " + a + " & b = " + b); + } + + public static void Launch() { + TestExcercice1(); + } + + + } +} diff --git a/pdf/CM/Cours1C#.pdf b/pdf/CM/Cours1C#.pdf new file mode 100644 index 0000000..9e8f24b Binary files /dev/null and b/pdf/CM/Cours1C#.pdf differ diff --git a/pdf/TD/TD1.pdf b/pdf/TD/TD1.pdf new file mode 100644 index 0000000..c12b222 Binary files /dev/null and b/pdf/TD/TD1.pdf differ