Table of Contents
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| internal partial class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| SwitchSamples.Greeting(); | |
| Console.WriteLine(); | |
| SwitchSamples.GradesTuple(); | |
| Console.WriteLine(); | |
| SwitchSamples.GroupBook(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| internal class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| string userInput = Console.ReadLine(); | |
| Console.WriteLine(Convert.ToInt32(userInput)); | |
| Console.ReadLine(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Text.Json; | |
| namespace WorkingWithArrays; | |
| internal class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| Console.WriteLine("Press ENTER to exit"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static decimal[] GetDecimals() | |
| => | |
| [ | |
| 99.40m, 98.62m, 98.13m, 96.31m, 85.59m, 78.95m, 62.73m, 58.23m, 57.36m, 57.03m, | |
| 50.41m, 49.46m, 35.86m, 30.07m, 29.84m, 27.56m, 25.73m, 17.10m, 13.95m, 10.32m | |
| ]; | |
| public static void LambdaWhereLocalArray() | |
| { | |
| decimal[] values = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Text.Json; | |
| namespace WorkingWithArrays.Classes; | |
| internal class MockedData | |
| { | |
| public static decimal[] GetDecimals() | |
| => | |
| [ | |
| 99.40m, 98.62m, 98.13m, 96.31m, 85.59m, 78.95m, 62.73m, 58.23m, 57.36m, 57.03m, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [method: SetsRequiredMembers] | |
| public record Person(string FirstName, string LastName, DateOnly BirthDate) | |
| { | |
| public int Id { get; set; } | |
| public required string FirstName { get; set; } = FirstName; | |
| public required string LastName { get; set; } = LastName; | |
| public required DateOnly BirthDate { get; set; } = BirthDate; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public readonly struct EllipsisNumericFormattable<T> : IFormattable where T : struct, IFormattable | |
| { | |
| private readonly T _value; | |
| private readonly int _width; | |
| private readonly char _paddingChar; | |
| public EllipsisNumericFormattable(T value, int width, char paddingChar) | |
| { | |
| _value = value; | |
| _width = width; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Category | |
| { | |
| public int Id { get; set; } | |
| public required string Name { get; set; } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var $debugHelper = $debugHelper || {}; | |
| $debugHelper = function () { | |
| const debugStyleId = "debugger-inline-style"; | |
| function addCss() { | |
| if (document.getElementById(debugStyleId)) return; // prevent duplicates | |
| const style = document.createElement("style"); | |
| style.id = debugStyleId; |
NewerOlder