Tuesday, 3 October 2017

C# Keywords and Data Type

C# Keywords 

Keywords are reserved words predefined to the C# compiler. These keywords cannot be used as identifiers. However, if you want to use these keywords as identifiers, you may prefix the keyword with the @ character.
In C#, some identifiers have special meaning in context of code, such as get and set are called contextual keywords.
The following table lists the reserved keywords and contextual keywords in C#:



Data Type 
Value type variables can be assigned a value directly. They are derived from the class System.ValueType. The value types directly contain data. Some examples are int, char, and float, which stores numbers, alphabets, and floating point numbers, respectively. When you declare an int type, the system allocates memory to store the value. 







Monday, 2 October 2017

Creating Hello World Program

A C# program consists of the following parts:
1. Namespace declaration
2.  A class
3.  Class methods
3.  Class attributes
4. A Main method
5. Statements and Expressions
6. Comments


Let us look at the various parts of the given program:
 The first line of the program using System; - the using keyword is used to include the System  namespace in the program. A program generally has multiple using statements.

 The next line has the namespace declaration. A namespace is a collection of classes. The  HelloWorldApplication namespace contains the class HelloWorld.

 The next line has a class declaration, the class HelloWorld contains the data and method definitions  that your program uses. Classes generally contain multiple methods. Methods define the behavior of  the class. However, the HelloWorld class has only one method Main.

 The next line defines the Main method, which is the entry point for all C# programs. The Main  method states what the class does when executed.

 The next line /*...*/ is ignored by the compiler and it is put to add comments in the program.

 The Main method specifies its behavior with the statement Console.WriteLine("Hello World");  WriteLine is a method of the Console class defined in the System namespace. This statement causes  the message "Hello, World!" to be displayed on the screen.

  The last line Console.ReadKey(); is for the VS.NET Users. This makes the program wait for a key     press and it prevents the screen from running and closing quickly when the program is launched         from Visual Studio .NET.

 It is worth to note the following points:
 C# is case sensitive.
1.  All statements and expression must end with a semicolon (;).
2.  The program execution starts at the Main method.
3. Unlike Java, program file name could be different from the class name.

C# Overview

C# is a modern, general-purpose, object-oriented programming language developed by Microsoft and approved by European Computer Manufacturers Association (ECMA) and International Standards Organization (ISO).
C# was developed by Anders Hejlsberg and his team during the development of .Net Framework.
C# is designed for Common Language Infrastructure (CLI), which consists of the executable code and runtime environment that allows use of various high-level languages on different computer platforms and architectures.
The following reasons make C# a widely used professional language:
 1. It is a modern, general-purpose programming language
 2.  It is object oriented.
 3.  It is component oriented.
 4.  It is easy to learn.
 5.  It is a tructured language.
 6.  It produces efficient programs.
 7.  It can be compiled on a variety of computer platforms.
8.  It is a part of .Net Framework.


Following is the list of few important features of C#:
1.  Boolean Conditions
2.  Automatic Garbage Collection
3.  Standard Library
4.  Assembly Versioning
5.  Properties and Events
6.  Delegates and Events Management
7.  Easy-to-use Generics
8.  Indexers
9. Conditional Compilation
10.  Simple Multithreading
11. LINQ and Lambda Expressions
12. Integration with Windows 

Sunday, 1 October 2017

The .Net Framework 

The .Net framework is a revolutionary platform that helps you to write the following types of applications:
 Windows applications
 Web applications
 Web services


The .Net framework applications are multi-platform applications. The framework has been designed in such a way that it can be used from any of the following languages: C#, C++, Visual Basic, Jscript, COBOL, etc. All these languages can access the framework as well as communicate with each other.

 The .Net framework consists of an enormous library of codes used by the client languages such as C#. Following are some of the components of the .Net framework:
 Common Language Runtime (CLR)

  1.  The .Net Framework Class Library 
  2. Common Language Specification 
  3.  Common Type System 
  4. Metadata and Assemblies 
  5. Windows Forms 
  6. ASP.Net and ASP.Net AJAX 
  7. ADO.Net 
  8. Windows Workflow Foundation (WF)
  9. Windows Presentation Foundation 
  10. Windows Communication Foundation (WCF)
  11. LINQ 

Banking System Project

//*************************************************************** //                   HEADER FILE USED IN PROJECT //********************...