







Description
This book is a set of well-documented programs in the C # language. The programs demonstrate using basic C# instructions, performing I/O operations, working with arrays, lists, and files. Shows how to define and use objects. It also shows how to use LINQ technology to perform operations with different data sources: arrays, lists, XML documents.
For beginners programmers
© Nikita Kultin, 2021
Contents at a Glance
Introduction
Unit 1: Console input and output
Unit 2: Conditional statements
Unit 3: Loops
Unit 4: Strings
Unit 5: Arrays
Unit 6: Lists
Unit 7: User define function
Unit 8: Working with files
Unit 9: Records
Unit 10: Classes and objects
Unit 11: LINQ
Unit 12: Exceptions
Conclusion
CONTENTS
About the book and author
Introduction
Unit 1: Console input and output
Simple pound to grams converter
Volume and surface area of a cylinder
Purchase cost calculation
Unit 2: Conditional statements
Pound to grams converter
Deposit income calculator
Mass of rod
Unit 3: Loops
Monthly payments
Minimum monthly payment
Table of trigonometric functions
Cube root calculator
Unit 4: Strings
Basic string operations
Check chars in string
Password generator
Hangman game
Unit 5: Arrays
Average of elements
Average salary
Minimal element of array
Sorting an array
Sorting an array (bubble method)
Binary search
Matrix and vector
Results of competitions
Mass of rod
Unit 6: Lists
List input
Operations with list
Unit 7: User define function
The CylinderVolume function
The CubeRoot function
The Resistance function
The Factorial function
Passing parameters by reference
Function overloading
Unit 8: Working with files
User folders
Reading numbers from a file
Writing to file
Disk cleanup
Unit 9: Records
Array of structures
List of structures
Load list of structures from text file
Unit 10: Classes and objects
Class TMaterial
Class TRod
Class Person
Array of objects
List of objects
Sorting list of objects
File of objects
Inheritance
Unit 11: LINQ
Array processing
Selection data from string array
List processing
Creating an XML document
Processing of an XML document
Unit 12: Exceptions
Format exception
Safe integer value input
Safe real value input
Conclusion