Skip to content

Commit 47e29a4

Browse files
committed
Lesson 7
1 parent d3bfb69 commit 47e29a4

File tree

5 files changed

+48
-0
lines changed

5 files changed

+48
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ Thumbs.db
5151
bin/
5252
.vs/
5353
obj/
54+
*.user

CSharpCourse.sln

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lesson_004__WinFormsApp", "
1717
EndProject
1818
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lesson_004__ClassLibrary", "Lesson_004__ClassLibrary\Lesson_004__ClassLibrary.csproj", "{D1450DD2-9285-4314-B3BC-2CDFD7F76972}"
1919
EndProject
20+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lesson_007", "Lesson_007\Lesson_007.csproj", "{C557AB33-F32F-449D-9656-DD2F514C0DBD}"
21+
EndProject
2022
Global
2123
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2224
Debug|Any CPU = Debug|Any CPU
@@ -51,6 +53,10 @@ Global
5153
{D1450DD2-9285-4314-B3BC-2CDFD7F76972}.Debug|Any CPU.Build.0 = Debug|Any CPU
5254
{D1450DD2-9285-4314-B3BC-2CDFD7F76972}.Release|Any CPU.ActiveCfg = Release|Any CPU
5355
{D1450DD2-9285-4314-B3BC-2CDFD7F76972}.Release|Any CPU.Build.0 = Release|Any CPU
56+
{C557AB33-F32F-449D-9656-DD2F514C0DBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
57+
{C557AB33-F32F-449D-9656-DD2F514C0DBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
58+
{C557AB33-F32F-449D-9656-DD2F514C0DBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
59+
{C557AB33-F32F-449D-9656-DD2F514C0DBD}.Release|Any CPU.Build.0 = Release|Any CPU
5460
EndGlobalSection
5561
GlobalSection(SolutionProperties) = preSolution
5662
HideSolutionNode = FALSE

Lesson_007/Lesson_007.csproj

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
</Project>

Lesson_007/Program.cs

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
namespace Lesson7
2+
{
3+
internal class Program
4+
{
5+
static void Main(string[] args)
6+
{
7+
Console.WriteLine($"Args length: {args.Length}");
8+
foreach (string item in args)
9+
{
10+
Console.WriteLine(item);
11+
}
12+
13+
int sum = Add(5, 6);
14+
Console.WriteLine(sum); // 11
15+
}
16+
17+
static int Add(int x, int y)
18+
{
19+
int result = x + y;
20+
return result;
21+
}
22+
}
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"profiles": {
3+
"Lesson7": {
4+
"commandName": "Project",
5+
"commandLineArgs": "run app"
6+
}
7+
}
8+
}

0 commit comments

Comments
 (0)