Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

C# Programming
C# Programming
C# Programming
Ebook298 pages1 hour

C# Programming

Rating: 5 out of 5 stars

5/5

()

Read preview

About this ebook

C# Programming: This book is specially written for Microsoft's .Net Developers in Computer Engineering and Information Technologies fields. Also those who are interested learning C#.Net can refer this book gain knowledge about power of C# for development of various .Net applications.

It covers virtually most of core features and some of the advanced features of C# Programming for dynamic website development including more than hands on examples tested through .NET. Most of code samples are presented in easy to use way through any simple text editor starting from notepad to rich editor like Microsoft Visual Studio.Net. Throughout the book most of the programming features are explained through syntax and examples to develop state-of-the-art Windows and Web applications using advanced concepts like Threading, GUI and other authentication features.
LanguageEnglish
PublishereBookIt.com
Release dateApr 26, 2016
ISBN9781456611934
C# Programming

Read more from Jitendra Patel

Related to C# Programming

Related ebooks

Programming For You

View More

Related articles

Reviews for C# Programming

Rating: 4.8 out of 5 stars
5/5

5 ratings1 review

What did you think?

Tap to rate

Review must be at least 10 words

  • Rating: 4 out of 5 stars
    4/5

    As a beginner, it was fairly helpful as a reference document. Working step-by-step through construction of some fairly simple programs would have been useful.

Book preview

C# Programming - Jitendra Patel

C# Programming

By Jitendra Patel

Overview

C# Programming: This book is specially written for Microsoft's .Net Developers in Computer Engineering and Information Technologies fields. Also those who are interested learning C#.Net can refer this book gain  knowledge about power of C# for develpoment of various .Net  applications. 

It covers virtually most of core features and some of the advanced features of C# Programming for dynamic website development including more than hands on examples tested through .NET. Most of code samples are presented in easy to use way through any simple text editor starting from notepad to rich editor like Microsoft Visual Studio.Net. Throughout the book most of the programming features are explained through syntax and examples to develop state-of-the-art Windows and Web applications using advanced concepts like Threading, GUI and other authentication features.

Copyright © 2012 Jitendra Patel

No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Nor is any liability assumed for damages resulting from the use of the information contained herein.

Warning and Disclaimer

Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied. The information provided is on an as is basis. The authors and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book.

Dedication

This book is dedicated to my honorable parents and beloved students who are my favorite person in the world.

PREFACE

I want to thank a number of people at my institute for helping us solve the difficulties of book and finding the solution of various critical problems I faced during writing the development.

As the reader of this book, you are my most important critic and commentator. I value your opinion and want to know what I am doing right, what I could do better, what areas you'd like to see us publish in, and any other words of wisdom you're willing to pass my way.

As an author of this book, I welcome your comments. You can email or write me directly to let me know what you did or didn't like about this book as well as what I can do to make the book better.

When you write, please be sure to include this book's title and author as well as your name, email address, and phone number. I will carefully review your comments on the book. 

Contents

Chapter 1.  Introduction to C#

1.1       Introduction

1.2       Evolution of C#

1.3       Characteristics of C#

1.4       Applications of C#

1.5       Difference between C++ and C#

1.6 Difference between Java and C#

Questions and answers

Chapter 2. Understanding .NET strategy

2.1       The .NET Strategy

2.2       The Origins of .NET technology

2.3       The .NET Framework

2.4       The Common Language Runtime

2.5       Managed Code

2.6       Visual Studio.NET

2.7       . NET Languages

2.8       Benefits of .NET approach

2.9       C# and .NET

Questions and Answers

Chapter 3.       Data Type, Literals and Variables.

3.1       Data Types

3.3       Variables

3.4       Default values of common data types

3.5       Scope of Variables

3.6       Constants

3.7       Boxing

3.8       Parameter Passing

Questions and Answers

Chapter 4        Operators and Expressions

4.1 C# Operators

4.2       Type conversion

Questions and Answers

Chapter 5        Decision Making and Branching

5.1       Decision Making With IF Statement

5.2       Nesting of IF… ELSE statement

5.4       The SWITCH statement

Questions and Answers

Chapter 6        Decision Making and Looping

6.1 Loop Structures

6.2       jumps in loops

Questions & Answers

Chapter 7        Methods in C#

7.1 Declaring a method.

7.2       Invoking Methods

7.4       Method Overloading

Questions & Answers

Chapter 8        Arrays

8.1       Creating a one-dimensional array.

8.2       Initializing one-dimensional arrays

8.3       Creation of two-dimensional array

8.4       Initializing two-dimensional arrays

8.5       Variable Size Arrays (Jagged Arrays)

8.6       Differences between Regular arrays and Jagged arrays

8.7       The System.Array class

8.8       The ArrayList Class

Questions & Answers

Chapter 9       Handling Strings

9.1       Immutable String.

9.2       Creating Strings

9.3       String Methods

9.4 MutableString( StringBuilder class )

9.5       Arrays of String

9.6       Regular Expressions

Questions & Answers

Chapter 10     Structures and Enumerations

10.1         Structures

10.2         Defining a Structure

10.3         Creating a structure instance

10.4         Nested Structures

10.5         Enumerations

10.6         Enumerator type conversion

Chapter 11         Classes and Objects

11.1 Basic principles of OOP’s

11.2         Class

11.3         Objects

11.4         Defining a class

11.5         Member Variables or Instance Variables

11.6         Methods

11.7         Creating Objects

11.8         Accessing Class Members

11.9         Constructors

11.10       Constructor Overloading

11.11       Static Members

11.12       Static Constructors

11.13       Private Constructors

11.14       Copy Constructor

11.15       Destructors

11.16       The this Reference

11.17       Constant Members

11.18       Read-Only Members

11.19       Properties

11.20       Indexers

Questions and Answers

Chapter 12     Inheritance and Polymorphism

12.1         Classical Inheritance

12.2         Containment Relation

12.3 Inheritance in C#

12.4         Defining Sub class constructors

12.5 Multilevel Inheritance

12.6   Hierarchical Inheritance

12.7  Constructors and Inheritance

12.8 Method Hiding

12.9         Method Overriding

12.10  Abstract methods

12.11         Abstract classes

12.12  Sealed Classes

12.13 Sealed methods

12.14       Inclusion Polymorphism or Dynamic binding

12.15         Operation Polymorphism or Static binding

Questions & Answers

Chapter 13 Interfaces

13.1         Introduction to Interfaces

13.2         Explicit interface member implementations

Questions and Answers

Chapter 14 Namespaces

14.1 Introduction to Namespace

14.2 Using namespace

Chapter 15     Delegates and Events

15.1         Delegates

15.2         Delegate Declaration

15.3         Delegate methods definition

15.4         Delegate instantiation

15.5         Delegate invocation

Chapter 1.  Introduction to C#

1.1   Introduction

C# is a simple, modern, object-oriented, versionable, compatible, flexible, interoperable and type safe programming language originated from C and C++. It combines the prominent features of modern programming languages like C++, Java, Visual Basic, etc. It is used mainly to create .NET applications. The .NET is the most modern development platform of Microsoft that enables the development of component-based applications. The .NET platform supports more than 20 different languages and the list is growing day by day. The C# compiler is considered to be the most efficient compiler in the .NET family and a major part of the .NET base classes libraries itself are written in C#.  

1.2   Evolution of C#

In the past two decades C and C++ were the most powerful and widely used languages for developing commercial and business softwares. These languages were often criticized for its longer development time and hence reduced productivity. So the developer community was longing for a highly productive and powerful language for their development needs. They required an environment that supports the emerging web standards and one that provides easy integration with existing applications. To address these problems Microsoft developed a platform called .NET. The alpha version of it was released in the mid of year 2000. Also in the same year Microsoft announced their C# language as a de fact language of the .NET platform. The C# compiler is considered to be the most efficient compiler in the .NET family and a major part of the .NET base classes libraries itself are written in C#.

1.3   Characteristics of C#

The major characteristics of C# are:

·         Simple

C# was designed to be easy for the professional programmer to learn and use effectively. If you have some programming experience, you will not find C# hard to master. Also, some of the confusing concepts from C++ are either left out of C# or implemented in a clearer manner. Say for example the complex pointers in C++ are missing in C#. In C++ you have ::, . , -> operators for namespaces, member access and references respectively. But in C# a single dot ( . )

Enjoying the preview?
Page 1 of 1