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


Let's rewind our learning for today - that is, day two - by solving the following problems:

  1. Write a short program to demonstrate that we can use same class name within different namespaces.
  2. Define the console class. Write a console program to display all available colors by modifying the code example discussed in the book so that all vowels will be displayed as green and all consonants as blue.
  3. Elaborate on C# reserved keywords.
  4. Describe different categories of C# keywords with examples.

 

  1. Create a small program to demonstrate the is and as operators.
  2. Write a short program to showcase a query expression with the help of contextual keywords.
  3. Write a short program to showcase the importance of the this and base keywords.
  4. Define boxing and unboxing with the help of a short program.
  5. Write a short program to prove that pointer type variable stores the memory of another variable rather than data.
  6. Write a short program to showcase the operator precedence order.
  7. What is operator overloading...