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

Hands-on exercise


Here are the unsolved questions from what you learned up until day four:

  1. What are access modifiers and their accessibility?
  2. Write a program to use protected internal.
  3. What are abstract classes? Elaborate with the help of a program.
  4. Does an abstract class have a constructor? If yes, the why can't we instantiate abstract class? (Refer to https://stackoverflow.com/questions/2700256/why-cant-an-object-of-abstract-class-be-created)
  5. Explain, with the help of a small program, how we can stop an abstract class from being inherited.
  6. Differentiate the sync and async methods.
  7. Differentiate the const and readOnly modifiers with the help of a small program.
  8. Write a program to calculate string numbers in addition to the following rules to our StringCalcuatorUpdated example:
  • Throw an exception where the number is greater than 1,000.
  • Ignore negative numbers by replacing them with zero.
  • If the entered string is not a number, throw an exception.
  1. Write a small program to elaborate on property types.
  2. Create...