diff --git a/CSHARP/Lessons.md b/CSHARP/Lessons.md index 9311d2a..c731da7 100644 --- a/CSHARP/Lessons.md +++ b/CSHARP/Lessons.md @@ -141,4 +141,21 @@ class Person personName = name; personAge = age; } +} + +"Класс Program и метод Main. Программы верхнего уровня" +string hello = "Hello"; +Print(hello); + +void Print(string message) +{ + Console.WriteLine(message); +} + +Person tom = new(); +tom.SayHello(); + +class Person +{ + public void SayHello() => Console.WriteLine("Hello"); } \ No newline at end of file diff --git a/CSHARP/Program.cs b/CSHARP/Program.cs index f68b2f5..da868bb 100644 --- a/CSHARP/Program.cs +++ b/CSHARP/Program.cs @@ -1,21 +1,7 @@ -Person person = new Person("Tom", 33); -(string name, int age) = person; //(_, int age) = person если нужен только возраст -Console.WriteLine(name); - +Person tom = new(); +tom.SayHello(); class Person { - string name; - int age; - public Person(string name, int age) - { - this.name; - this.age; - } - public void Deconstruct(out string personName, out int personAge) - { - personName = name; - personAge = age; - } -} - + public void SayHello() => Console.WriteLine("Hello"); +} \ 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 5a6b5ca..056d1c1 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 0c47665..131de57 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 e593fe4..93836ad 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 c4f620d..e20c5b1 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+a385581ef2126891ffe561caf708150c6ef0c3cd")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+837beff6c4cc7361396562a13cbbd8cb10871924")] [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 42986f0..2e51eb7 100644 --- a/CSHARP/obj/Debug/net9.0/CSHARP.AssemblyInfoInputs.cache +++ b/CSHARP/obj/Debug/net9.0/CSHARP.AssemblyInfoInputs.cache @@ -1 +1 @@ -e5d3a2d50b713fd5feb66a02c824290572091f66fdfcd5902a5e5cb105d4cb38 +de142c11f05cd3451d0fc80307c6b9777eff4cdf53e21bc224e6160abef0828c diff --git a/CSHARP/obj/Debug/net9.0/CSHARP.dll b/CSHARP/obj/Debug/net9.0/CSHARP.dll index 5a6b5ca..056d1c1 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.pdb b/CSHARP/obj/Debug/net9.0/CSHARP.pdb index e593fe4..93836ad 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 0c47665..131de57 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 010fbbd..300b15f 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 010fbbd..300b15f 100644 Binary files a/CSHARP/obj/Debug/net9.0/refint/CSHARP.dll and b/CSHARP/obj/Debug/net9.0/refint/CSHARP.dll differ