Ajoutez des fichiers projet.
This commit is contained in:
25
TestSonarqube.sln
Normal file
25
TestSonarqube.sln
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.14.36408.4 d17.14
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestSonarqube", "TestSonarqube\TestSonarqube.csproj", "{9EF861DD-89C0-45EC-8914-A1FAD9052B77}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{9EF861DD-89C0-45EC-8914-A1FAD9052B77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{9EF861DD-89C0-45EC-8914-A1FAD9052B77}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{9EF861DD-89C0-45EC-8914-A1FAD9052B77}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{9EF861DD-89C0-45EC-8914-A1FAD9052B77}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {3E9CFC24-9941-4BA0-907B-B04BCFE6BB74}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
50
TestSonarqube/Program.cs
Normal file
50
TestSonarqube/Program.cs
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
Console.WriteLine("Hello, World!");
|
||||||
|
|
||||||
|
// Fiboonacci sequence
|
||||||
|
|
||||||
|
int Fibonacci(int n)
|
||||||
|
{
|
||||||
|
if (n <= 0) return 0;
|
||||||
|
if (n == 1) return 1;
|
||||||
|
return Fibonacci(n - 1) + Fibonacci(n - 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
// volontary unused variable
|
||||||
|
int x = 10;
|
||||||
|
|
||||||
|
Console.WriteLine(Fibonacci(10));
|
||||||
|
|
||||||
|
if (args.Length > 0)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Arguments:");
|
||||||
|
foreach (var arg in args)
|
||||||
|
{
|
||||||
|
Console.WriteLine(arg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("No arguments provided.");
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (DateTime.Now.DayOfWeek)
|
||||||
|
{
|
||||||
|
case DayOfWeek.Monday:
|
||||||
|
Console.WriteLine("It's Monday!");
|
||||||
|
break;
|
||||||
|
case DayOfWeek.Friday:
|
||||||
|
Console.WriteLine("It's Friday!");
|
||||||
|
break;
|
||||||
|
case DayOfWeek.Sunday:
|
||||||
|
Console.WriteLine("It's Sunday!");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Console.WriteLine("It's some other day.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < 5; i++)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"Count: {i}");
|
||||||
|
}
|
||||||
10
TestSonarqube/TestSonarqube.csproj
Normal file
10
TestSonarqube/TestSonarqube.csproj
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
Reference in New Issue
Block a user