This commit is contained in:
OMGiTzPomPom 2022-09-08 08:53:24 +02:00
parent 6373f6836f
commit e4e304a391
6 changed files with 70 additions and 0 deletions

3
Program.cs Normal file
View File

@ -0,0 +1,3 @@
using Programmation_objet_TLESIO21.TD1;
Td1.Launch();

View File

@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Programmation_objet_TLESIO21</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -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

31
TD1/td1.cs Normal file
View File

@ -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();
}
}
}

BIN
pdf/CM/Cours1C#.pdf Normal file

Binary file not shown.

BIN
pdf/TD/TD1.pdf Normal file

Binary file not shown.