Book Image

Learn C# in 7 days

By : Gaurav Aroraa
1 (1)
Book Image

Learn C# in 7 days

1 (1)
By: Gaurav Aroraa

Overview of this book

This book takes a unique approach to teach C# to absolute beginners. You’ll learn the basics of the language in seven days. It takes a practical approach to explain the important concepts that build the foundation of the C# programming language. The book begins by teaching you the basic fundamentals using real-world practical examples and gets you acquainted with C# programming. We cover some important features and nuances of the language in a hands-on way, helping you grasp the concepts in a fluid manner. Later, you’ll explore the concepts of Object-Oriented Programming (OOP) through a real-world example. Then we dive into advanced-level concepts such as generics and collections, and you’ll get acquainted with objects and LINQ. Towards the end, you’ll build an application that covers all the concepts explained in the book. By the end of this book, you will have next-level skills and a good knowledge of the fundamentals of C#.
Table of Contents (15 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Understanding statements


In C#, you can evaluate different kinds of expression that would or would not generate the results. Whenever you say something like what would happen if result >0, in that case, we are stating something. This can be a decision-making statement, result-making statement, assignment statement, or any other activity statement. On the other hand, loops are a code block that repeatedly executes a couple of statements.

In this section, we will discuss statements and loops in detail.

A statement should perform some action before returning a result. In other words, if you are writing a statement, that statement should say something. To do that, it has to execute some inbuilt or custom operations. Statements can depend upon a decision or can be a part of the result of any existing statement. The official page (https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/statements-expressions-operators/statements) defines statement as:

A statement can consist of a...