diff --git a/CSHARP/Lessons.md b/CSHARP/Lessons.md index e69de29..6d304c4 100644 --- a/CSHARP/Lessons.md +++ b/CSHARP/Lessons.md @@ -0,0 +1,23 @@ +=== Классы и объекты === + +Person tom = new Person(); +string personName = tom.name; +int personAge = tom.age; +Console.WriteLine($"name: {personName} age: {personAge}"); + +tom.name = "Tom"; +tom.age = 37; +tom.Print(); + +class Person +{ + public string name = "Undefined"; + public int age; + + public void Print() + { + Console.WriteLine($"Имя: {name} Возраст: {age}"); + } +} + +=== === \ No newline at end of file diff --git a/CSHARP/Program.cs b/CSHARP/Program.cs index 0936872..d3f2321 100644 --- a/CSHARP/Program.cs +++ b/CSHARP/Program.cs @@ -1,16 +1,19 @@ -//типы данных -int age = 25; -double price = 19.99; -string name = "Vasya"; -bool active = true; -char symbol = 'S'; -decimal tax = 15.99M; -DateTime today = DateTime.Now; -List names = new List { "Vasya", "Petya" }; -Dictionary students = new Dictionary +Person tom = new Person(); +string personName = tom.name; +int personAge = tom.age; +Console.WriteLine($"name: {personName} age: {personAge}"); + +tom.name = "Tom"; +tom.age = 37; +tom.Print(); + +class Person { - {1, "Alice" }, - {2, "Frank" }, - {3, "Ivan"} -}; -string[] days = { "Mon", "Tue", "Wed" }; + public string name = "Undefined"; + public int age; + + public void Print() + { + Console.WriteLine($"Имя: {name} Возраст: {age}"); + } +} \ No newline at end of file diff --git a/CSHARP/bin/Debug/net9.0/CSHARP.dll b/CSHARP/bin/Debug/net9.0/CSHARP.dll index 0a603d3..8b40bd9 100644 Binary files a/CSHARP/bin/Debug/net9.0/CSHARP.dll and b/CSHARP/bin/Debug/net9.0/CSHARP.dll differ diff --git a/CSHARP/bin/Debug/net9.0/CSHARP.exe b/CSHARP/bin/Debug/net9.0/CSHARP.exe index 9aa9715..895f6f8 100644 Binary files a/CSHARP/bin/Debug/net9.0/CSHARP.exe and b/CSHARP/bin/Debug/net9.0/CSHARP.exe differ diff --git a/CSHARP/bin/Debug/net9.0/CSHARP.pdb b/CSHARP/bin/Debug/net9.0/CSHARP.pdb index 1f5138e..e3e5302 100644 Binary files a/CSHARP/bin/Debug/net9.0/CSHARP.pdb and b/CSHARP/bin/Debug/net9.0/CSHARP.pdb differ diff --git a/CSHARP/obj/Debug/net9.0/CSHARP.AssemblyInfo.cs b/CSHARP/obj/Debug/net9.0/CSHARP.AssemblyInfo.cs index d1b0758..a3fcc4f 100644 --- a/CSHARP/obj/Debug/net9.0/CSHARP.AssemblyInfo.cs +++ b/CSHARP/obj/Debug/net9.0/CSHARP.AssemblyInfo.cs @@ -13,10 +13,10 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("CSHARP")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+85c2d250c01f4ee1c62a217cda019d8b45da2f44")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+aa050c247f6147a284a534e34522aed399958c7f")] [assembly: System.Reflection.AssemblyProductAttribute("CSHARP")] [assembly: System.Reflection.AssemblyTitleAttribute("CSHARP")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] -// Generated by the MSBuild WriteCodeFragment class. +// Создано классом WriteCodeFragment MSBuild. diff --git a/CSHARP/obj/Debug/net9.0/CSHARP.AssemblyInfoInputs.cache b/CSHARP/obj/Debug/net9.0/CSHARP.AssemblyInfoInputs.cache index 8c9b724..2c96909 100644 --- a/CSHARP/obj/Debug/net9.0/CSHARP.AssemblyInfoInputs.cache +++ b/CSHARP/obj/Debug/net9.0/CSHARP.AssemblyInfoInputs.cache @@ -1 +1 @@ -3de7edf971a36d8f480ea014734f387790fab06fc009fabab9562c2e90fac240 +8b42992521c44adabdfff2f0c94aca9302acbb4a3d22a089bd2074043d71fed8 diff --git a/CSHARP/obj/Debug/net9.0/CSHARP.dll b/CSHARP/obj/Debug/net9.0/CSHARP.dll index 0a603d3..8b40bd9 100644 Binary files a/CSHARP/obj/Debug/net9.0/CSHARP.dll and b/CSHARP/obj/Debug/net9.0/CSHARP.dll differ diff --git a/CSHARP/obj/Debug/net9.0/CSHARP.genruntimeconfig.cache b/CSHARP/obj/Debug/net9.0/CSHARP.genruntimeconfig.cache index 719e2ad..5e9acde 100644 --- a/CSHARP/obj/Debug/net9.0/CSHARP.genruntimeconfig.cache +++ b/CSHARP/obj/Debug/net9.0/CSHARP.genruntimeconfig.cache @@ -1 +1 @@ -a3bc34b74b754593ef89b2c29aac9a3ffe2f10e122c68a131fbbbdf1953586c3 +b35e9c216da37a7db1e57c4dd5dcac470b2c3540edcd108f82c27f7703827df8 diff --git a/CSHARP/obj/Debug/net9.0/CSHARP.pdb b/CSHARP/obj/Debug/net9.0/CSHARP.pdb index 1f5138e..e3e5302 100644 Binary files a/CSHARP/obj/Debug/net9.0/CSHARP.pdb and b/CSHARP/obj/Debug/net9.0/CSHARP.pdb differ diff --git a/CSHARP/obj/Debug/net9.0/apphost.exe b/CSHARP/obj/Debug/net9.0/apphost.exe index 9aa9715..895f6f8 100644 Binary files a/CSHARP/obj/Debug/net9.0/apphost.exe and b/CSHARP/obj/Debug/net9.0/apphost.exe differ diff --git a/CSHARP/obj/Debug/net9.0/ref/CSHARP.dll b/CSHARP/obj/Debug/net9.0/ref/CSHARP.dll index 3703a8e..01f285b 100644 Binary files a/CSHARP/obj/Debug/net9.0/ref/CSHARP.dll and b/CSHARP/obj/Debug/net9.0/ref/CSHARP.dll differ diff --git a/CSHARP/obj/Debug/net9.0/refint/CSHARP.dll b/CSHARP/obj/Debug/net9.0/refint/CSHARP.dll index 3703a8e..01f285b 100644 Binary files a/CSHARP/obj/Debug/net9.0/refint/CSHARP.dll and b/CSHARP/obj/Debug/net9.0/refint/CSHARP.dll differ