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


Solve the following questions, which cover the concepts from today's learning:

  1. What is reflection? Write a short program to use System.Type.
  2. Create a class that contains at least three properties, two constructors, two public methods, and three private methods, and implements at least one interface.
  3. Write a program with the use of System.Reflection.Extensins to assess the class created in question two.
  4. Study the NuGet package System.Reflection.TypeExtensions and write a program by implementing all of its features.
  5. Study the NuGet package System.Reflection. Primitives and write a program by implementing all of its features.
  6. What are delegate types and how can you define multicast delegates?
  7. What are events? How are events are based on the publisher-subscriber model? Show this with the use of a real-world example.
  8. Write a program using delegates and events to get an output similar to https://github.com/garora/TDD-Katas#string-sum-kata.
  9. Define collections and implement non-generic...