Tuesday, 21 May 2013

PROGRAMMING PART OF C# --- OBJECTS AND VARIABLES CONTINUED

Submit ExpressSEO Services & Tools
PROGRAMMING PART OF C#  --- OBJECTS AND VARIABLES CONTINUED

             A C# program can be written by using the Windows Notepad application.  After creating a C # program in the Notepad application,  you need to compile and execute the program to get the desired output.  The compiler coverts the program's source code to machine code, such that the computer source code to machine code, such that the computer can understands the instructions in the program.

CREATING A SAMPLE C# PROGRAM 
         

using System;
class Car
               {
                 //Member variables
                 string Engine;
                 int NoOfWheels;
                 //Member functions
                 public void InputDetails()
                  {
                      Console.WriteLine("Enter the Engine Model");
                      Engine = Console.ReadLine();
                      Console.WriteLine("Enter the number of Wheels");
                      NoOfWheels = Convert.ToInt32(Console.ReadLine());
                      }

  public void DisplayDetails()
                  {
                      Console.WriteLine("The Engine Model is :{0}", Engine);
                      Console.WriteLine("The number of Wheels are: {0}", NoOfWheels);
                      NoOfWheels = Convert.ToInt32(Console.ReadLine());
                    }
}
//Class used to instantiate the Car class
class MainClass
{
              public static void Main(string[] args)
             {
                 Car MyCar = new Car();
                  MyCar.InputDetails();
                  MyCar.DisplayDetails();
              }
}

Typical building blocks of a C# program are:
  • The using keyword
  • The class keyword
  • The comment entry
  • The member variables
  • The member functions
  • The instantiating class
The using Keyword
    The using keyword is used to include the namespaces in the program.  Keywords are reserved words that have a special meaning.  The statement, using System, declares that you can refer to the classes defined in the namespace without using the fully qualified name.  You can write multiple using statements in your program to include more than one namespace in the program.

The class Keyword
      The class keyword is used to declare a class.  In the preceding code, the class keyword defines the class, Car.  The braces, known as delimiters, are used to indicate the start and end of a class body.

The Comment Entry
       Comments are used to explain the code in a program.  Compilers ignore the comment entries included in a program.  The symbol '//' treats the rest of code within the same line as a comment.  If a comment entry spans more than one line, it has to be enclosed within '/*' and '*/'.

The following examples show the usage of comment entries in C#:

  • // Single Line Comment
  • /* This is the sample program to display addition of two numbers                                                                                                                    
  •    Multiple line comment */
Member Variables
       Variables are used to store data in the memory.  Variables are also called the data members of a class.  In the code, the Car class has two member variables, Engine and NoofWheels.  These variables are used to store the data provided by the user.

Member Functions
        A function is a set of statements that perform a specific task in response to a message.  The  functions of a class are called member functions in C# and are also referred to as methods.  Member functions are declared within a class.  The function declaration declares the name of the function and its attributes in the class and the function definition contains the code of the function.  A program calls a function by using the function name.  However , what will the function do when it is called, is represented by the function definition.
        The Car class code contains two member functions, InputDetails and DisplayDetails.  These are declared and defined within the class.  Notice that the function definition contains code, which is written inside a block by using braces '{}'.  These braces represent the start and end of the function body.
         The InputDetails() mehod in the Car class code snippet will prompt the user to enter the engine model and number of wheels in the vehicle.  It will then store these details in the respective variables.  Further, the DisplayDetails() method will display the values stored in the member variables.

Instantiating Class
    In the Car class code, the MainClass class contains the Main() method.  This class is used to instantiate the Car class.  The first line of code that a C# compiler looks for is the Main() method.
    To implement the functionality of a class, you need to create an object of the class.  Objects interact with each other by passing messages and by responding to the received messages.  In C#, the task of passing messages can be done by using the member functions.
     All the objects of a class share the same copy of the member functions.  However, they maintain a separate copy of each member variable in memory.  The sharing of member functions and non sharing of member variables by the objects is shown in the following .
     Suppose there is Class: Car.  It has two variables: Member Variable1 and Member Variable2 .  And it has two functions : Member function 1 and Member function2.  Now two objects are created from it.  Let me briefly explain it.  In the previously example.  Car class.  To create an object named Mycar of the Car class , the following code snippet is given in the Main() method.
   
      Car Mycar = new Car();
    The member functions of the class are accessed through an object of the class by using the "." operator, as shown in the following code snippet:
    Mycar.InputDetails();
    Mycar.DisplayDetails();
      In the preceding example, the object name and the "." operator are used to access the two member functions, InputDetails() and DisplayDetails().  Inaa other words, the object Mycar of the class Car invoked the InputDetails() and DisplayDetails() methods.  These functions accept the values for the engine type and the number of wheels from the user and display the same, respectively.

Note
     The preceding code invokes the member functions from within the Main() method.  Usually, member functions are declared and defined under the public access specifier.  Access specifiers are used to determine if any other class can access the variables or function of a class.  You will learn more about access specifiers in subsequent posts.

Monday, 20 May 2013

PROGRAMMING PART OF C#: OBJECTS AND VARIABLES


We already have discussed classes.  Now we will go deep in programming, we will start discussing the basic programming part of C sharp.   We start with objects.
OBJECT
An object is an instance of a class.  You create objects to access member variables and member functions of a class.  Now let us discuss what are variables and functions.
VARIABLE
Consider a situation where you have to create a program that accepts two numbers from a user and displays the sum of the numbers on the screen.  Now, while reading the numbers provide by the user, you need to store somewhere in the memory so that you can perform the add operation on the numbers.  You can store the numbers in the memory by using variables.  A variable is a location in the memory that has a name and contains a value.  The value could be integer, such as 27, a decimal, such as 9.85, or a character, such as ‘L’.  A variable is associated with a data type that defines the type tof data that can be stored in the variable.
For example, a variable called TennisPlayerName will ideally store characters, whereas a variable called High Score will store numbers.  A program refers to a variable by its name.
Naming Variables in C#
In C#, the following rules are used for naming variables:
·         A variable name must begin with a letter or an underscore (‘_’), which may be followed by a sequence of letters, digits(0-9), or underscores.  The first character in a variable name cannot be a digit.
·         A variable name should not contain any embedded spaces or symbols, such as                  “ ?!@#$%^&*()[]{}.,’;:\/”.  However, an underscore can be used wherever a space is required, like High_Score.
·         A variable name must be unique.  For example, to store four different numbers, four unique variable names need to be used.
·         A variable name can have any number of characters.
·         Keywords cannot be used as variable names.  For example, you cannot declare a variable named class as it is a keyword in C#.
The examples of valid variable names are:
·         Game_Level
·         High_Score
·         This_variable_is_very_long
The examples of invalid variable names are:
·         #score
·         2strank
Note

C# is a case-sensitive language.  This means that the TennisPlayerName variable is not the same as the tennisplayername variable.  In other words, Uppercase letters are considered distinct from lowercase letters.


DECLARING AND INITIALIZING VARIABLE
You can declare and initialize variables by using the following syntax:
<data_type> <variable_name> = <value>;
In the preceding syntax, the   <data_type> represents the kind of data type that will be stored in a variable and <value> specifies the value that needs to be stored in the variable.
Consider the following statement that declares a variable:
Int age=1;
The preceding statement declares a variable named age of the int data type.  In addition, the statement initializes the variable with the value, 1.  The int data type is used to store numeric data (integers).
Consider the following statement:
Char choice=’y’
The preceding statement declares the variable choice of the char data type and initializes the variable with the value, y.
DATA TYPES IN C#
C# provides various built – in data types.  Built-in data types are predefined data types that can be directly used in a program to declare variables.





The following table lists some of the built in data types in C#



Predefined Type
#Bytes
Range of values

Char
2
0 to 65535
Int
4
-2147483648 to 2147483647
Float
4
-3.402823 * 10^38 to -1.401298*10^-45(for negative values)
1.401298*10^-45 and 3.402823*10^38(for positive values)

Double
8
-1.79769313486232E308 to -4.940656455841247E-324(for negative values) and 4.94065645841247E-324 to       1. 79769313486232E308(for positive values)
Bool
1
True or False
String
Variable length
0-2 billion Unicode characters

The #Bytes column in the preceding table specifies the bytes that are required to store the value in the memory.
TYPES OF DATA TYPES
C# supports the following data types:
·         Value types: The value types directly contain data.  Some examples of the value types are char, int, and float, which can be used for storing alphabets, integers, and floating point values, respectively.  When you declare an int variable, the system allocates memory to store the value.
·         References types: The reference type variables, instead of containing data, contain a reference (address) to the data stored in the memory.  More than one reference type variable can be created to refer to the  same memory location.  This means that if the value in the referenced memory location is modified, all the referring  variables automatically reflect the changed value.  The example of reference type is string data type.

ACCEPTING AND STORING VALUES IN MEMBER VARIABLES
       
           To understand how to store value in a variable, consider the following code snippet:
     
                 int Number;
                 Number = Convert.ToInt32(Console.ReadLine());
          In the preceding code snippet, the  Console.ReadLine() method is used to accept data from the user and store it in the variable named Number.  The Console.ReadLine() method is a method of the Console class, which is a part of the System namespace.

          Further, the Convert.ToInt32() method converts the data provided by the user to the int data type.  You need to do this conversion because the Console.ReadLine() method, by default, accepts the data in the string format.  The Convert() method explicitly informs the compiler to convert one data type to the other.  This is known as explicit conversion.
   
         In addition to explicit conversion, there are instances when the compiler performs implicit conversions, which are done automatically(without any explicit coding).  For example, implicit conversion converts the int data type to float or float data type to int, automatically.



Saturday, 18 May 2013

PROGRAMMING PART OF C# - AN INTRODUCTION TO WRITTING PROGRAMS

AN INTRODUCTION TO WRITING PROGRAMS

           Now we are going for simple programming.   


USING C # FOR WRITING PROGRAMS

               Similar to the various programming languages, C# also has some predefined keywords that can be used for writing programs.  For example, class is a keyword in C# that is used to define classes.  Keywords are reserved words that have a special meaning.  Further, the syntax for C# for defines rules for grammatical arrangement of these keywords.

                 For example, the syntax of declaring a class in C# is:
    class <class name>
{
. . . . . .
}
                 In the preceding syntax, the braces, known as delimiters, are used to indicate the start and end of a class body.

Classes in C#
                 
                 C# classes are the primary building blocks of the language.  C# also provides certain predefined set of classes and methods.  These classes and methods provide various basic functionalities that you may want to implement in your application.

                 For example, if you want to perform some input/output operations in your application, you can use predefined classes available in the System.IO  namespace.  A namespace is a collection of classes.

                 In addition to using the predefined classes, you can also define your own classes.  Consider the following code snippet, which defines a class named Hello :
             
           public class Hello
{
                     public static void Main (string[] args)
                     {
                        System.Console.WriteLine("Hello, World! \n");
                        }
}
                  The preceding class declaration includes the method,  Main() that will display the message          " Hello World"  on your screen.  The following components in the preceding snippet build the complete class:
  • The Main() method
  • The class keyword
  • The class name
  • The System.Console.WriteLine() method
  • The escape character
           THE MAIN METHOD
               The first line in the code that C# compiler looks for int he compiled source file is the Main() method.  This method is the entry point for an application.  The Main() method is ideally used to create objects and invoke the methods of the class.
Note
      string[]args in the preceding snippet is an argument passed to the Main() method.  Arguments that are passed to methods will be explained later in the subsequent posts.

Note
       You must include a Main() method in the class to make it executable.

          THE CLASS NAME
The class keyword is used to declare a class.   In the preceding code snippet, the class keyword declares the class, Hello is the name of the class defined by using the class keyword.

Class Naming Conventions in C#

Class names should follow certain naming conventions or guidelines.  A class name:
  • Should be meaningful (Strongly recommended).
  • Should ideally be noun.
  • Can use either the Pascal case or Camel case.  In Pascal case, the first letter is capitalized and the rest of the letters are in lower case, such as Futureclass.  In Camel case, the first letter is in lower case and the first letter of each subsequent word is capitalized, such as futureClass or intFutureClass.
Rules For Naming Classes in C#

In addition to the conventions, there are certain rules that must be followed while naming classes in C#.  The name of classes:
  • Must begin with a letter.  This letter may be followed by a sequence of letters, digits(0-9), or '_'.  The first character in a class name cannot be a digit.
  • Must not contain an embedded space or a symbol like ?+-*/!@#$%^&*[]{}().:./';:".  However, an underscore('_') can be used wherever a space is required.
  • Must not use a keyword for a class name.  For example, you cannot declare a class called public. 

System.Console.WriteLine() Method

Console is a class that belongs to the System namespace.  The System namespace contains the Console class that includes a predefined WriteLine() method.  This method displays the enclosed text on the user's screen.  The Console class has various other methods that are used for various input/output operations.

The dot character(.) is used to access the WriteLine() method,  which is present in the console class of the System namespace.

Note

Referencing a method in this form is also known as referencing a method by using a fully qualified name.


The System.Console.WriteLine() statement can also be written as Console.Writeline() if the statement using System is included as the first line of code in the code snippet.
       The following code snippet is an example of Console.WriteLine() method:
     Console.WriteLine("Hello, World! \n");

The preceding code snippet will display the following message on the screen:

Hello, World!

Note

The WriteLine() method is used to write on the screen.  To read the input provided by the users,  you can use the ReadLine () method.  The method will be discussed later during the course.

PROGRAMMING PART OF C# - AN INTRODUCTION TO COMPILERS

WHAT IS A COMPILER? GIVE A BRIEF NOTE ABOUT IT?

                 All languages have  vocabulary, which is a list of words that have a specific meaning in that language.  Languages also have their own grammar rules, which state the rules for combining words to form sentences.  This ensures that whatever is spoken in a particular language is understood in the same way by all people who know the language.  Similarly, programming languages also have a vocabulary, which is referred to as the set of keywords of that language, and a grammar, which is referred to as syntax.

                Consider a scenario, where one person speaks in English with the other person.  However the person who is listening understands Chinese and not English.  Therefore, he calls a translator who can translate the words of English to Chinese.  Similarly, computers cannot directly understand the instructions written in a programming language.  Therefore, you need a translator to convert the instructions written in a programming language to machine language.

                 A compiler is a special program that processes the statements written in a particular programming language and converts them into machine language.  Like  everything else in the computer, the compiler also follows the Input Process Output cycle.  It takes the programming language instructions as input.  It processes these instructions to convert them to machine language.  These instructions can then be executed by the computer.  This process of conversion is called compilation.  The following figure shows the working of a compiler.

               For each programming language, there is a different compiler available.  For example, to compile a program written in the C language, you require a C compiler.  For a Java program, you require a Java compiler.  For C# you will use csc compiler.

Friday, 17 May 2013

DIGGING DEEP IN THE PHASES OF OBJECT ORIENTED METHODOLOGY

WHAT ARE THE PARTS OF OBJECT ORIENTED METHODOLOGY?


             In the past post i have given a short note on the phases of  object oriented methodology! Now i m going to discuss in detail.
   
THE ANALYSIS PHASE
              "The purpose of analysis is to provide a description of a problem.  The description must be complete, consistent, readable, and review able by diverse interested parties, and testable against reality"-Mellor 
               Broadly , analysis is the phase where users and developers of the system get together and arrive at a common understanding of the system.  One of the end products of the analysis phase is the specification on how a system functions.          

               In the analysis phase, the developer concentrates on obtaining as much information as possible about the problem.  The developer has to identify the critical requirements.  Analysis, therefore, involves meeting and interviewing the concerned persons to understand systems that are currently in operation and identifying all the causes of problems(if any) in the current system.

                Consider a scenario, where an architect is appointed by New Trends, Inc. for the construction of a new store for the organization.  In the analysis phase, the architect interacts with the manager of New Trends,  Inc. and en quire about the requirements for the new store.  The architect, after understanding the requirements laid down by the manager, prepares a construction specification note in which he writes down the requirements clearly.

THE DESIGN PHASE
                 In the design phase, the developers of the system document their understanding of the system.  Design generates the blueprint of the system that is to be implemented.

                The first step in creating an Object Oriented Design is the identification of classes and their inter relationships.

                 Work in the design phase of software development is comparable to the work of an architect.  For instance, in the preceding scenario, the architect will need to create a blue print or a model of the building before the construction of the building starts.

THE IMPLEMENTATION PHASE
                 The design phase is followed by the implementation phase.  In this phase, the actual construction of the product starts.  For example, in this phase the architect will start the construction on the new store by considering the blue print of the building.
                 
                 For the purpose of software development, this phase constitutes of object oriented Programming (OOP).  OOP provides specifications for writing programs in a programming language.  One of the most popular languages that is used to develop object oriented programs in C#, generally read as C sharp.
                   
                  During the implementation phase, programming is done as per the requirements gathered during the analysis and design phases.
    
                   Many of the modern applications are built by using OOP.  Developing complex, large scale business systems can be simplified by using this technique are Computer Aided Design(CAD), Computer Aided Manufacturing (CAM),  and Object Oriented Databases (OOD). CAD is used for technical and engineering drawing, CAM is used for manufacturing or prototyping (initial models) product components, and OOD is database model in which information is represented in the form of objects.


Thursday, 16 May 2013

OBJECT ORIENTED METHODOLOGY CONTINUED

     OBJECT ORIENTED METHODOLOGY CONTINUED

        Before the actual development of any product, important steps, such as analysis and design need to be performed.  The following phases are involved in the object oriented methodology:
  • The Analysis phase
  • The Design phase
  • The Implementation phase
           Consider an aircraft manufacturing factory where a new aircraft is being assembled and several competent engineers and workmen are working with specialized tools.  Can you visualize them working purely on what they feel,  grabbing the tools, and sitting down to work immediately?  Or, do you see them working according to a detailed design on which they have spent hundreds of hours, and finally constructing the aircraft based on the specified design.
             
           For the safety of millions of people who fly every day, it is recommended to use a detailed design.  After all, it is comforting to know that a lot of thought has gone into first making a model design on paper and then translating the design into the physical aircraft.  The same holds true for almost any item that is constructed.  Similarly, fashion designers put pen to paper before cutting the fabric with scissors and Architects draw layouts of building on blueprints before the brick are laid.

          The development of software follows the same approach. The software industry still relies mainly on the informal paper and pencil approach in the initial development phases.
   
          The paper and pencil approach is termed analysis and design.  To analyze and design a system, you need to build a model of the system.  This model is simpler than the system that is finally constructed.  All the practical aspects of building a system for the real world cannot be reflected in the design.

Chapter 2- Characteristics of the Object Oriented Approach

Chapter 2- Characteristics of the Object Oriented Approach
           
            At the past post i have been talking about object.  We will continue about that.  In addition to the object having a state, behavior, and identity, it exists as a stand-alone entity that can be used in any relevant context or in another meaning it can be used in many closely connected ways.  Therefore, its a a reusable component.  For example, if you have a chair, you can use the same chair in an office, in a classroom, or in a garden.

                  An existing object can be used to create a similar object.  For example, you have a simple wooden chair and you need to add a headrest to it.  You do not need to create a new chair because you can easily add a headrest to the existing chair.  This is known as flexibility to change.   Now i am going to explain it in detail
 
REALISTIC MODELING
                 
                  We live in a world of objects.  Therefore, it logically follows that the object-oriented approach models the real world more accurately or follows the modelling of real world.  The object oriented approach allow you to identify entities as objects having attributes or properties  and behavior.  Attribute and behavior typically depict how the object acts and reacts.  For example, a boat is an object belonging to the class, Vehicle.  The boat has attributes such as speed, color, and weight and displays behavior such as being stationary or moving.

RE-USABILITY

                  In  software industry, using existing classes or objects from other applications saves resources spent in recreating the classes from the beginning.  Consider the following example:
               
                  Carcare is a leading car making company.  It makes two-seater cars that are very popular among the customers aged between 20 and 24.  The company has decided to enter the family segment market and has decided to manufacture a four-seater model.
                   Carcare can either design a new car for the family segment or convert the two-seater model to a four-seater model.  The cost to design a new model is very high as compared to the cost to convert the two -seater model to a four-seater model.
                   Therefore, the management and the design team may decide to convert the two seater model into a four-seater model.
                   Two seater car:
                     ----Attributes
                     ----Behavior


                  Four-seater Car
                     ----Two seater car: Attributes
                     ----Two seater car: Behavior
                     ----New Attributes
                     ----New Behavior

                    The preceding example shows the concept of re-usability that is supported by the object-oriented approach.  This process of creating a new class by adding some new features to an existing class is known as inheritance .  The concept of re-usability saves time and effort, which result in cost benefits.


FLEXIBILITY TO CHANGE

                   The object oriented approach allows system to evolve.  When a change is needed, the old system need not be completely abandoned.
                   Flexibility to change adds to extensibility.  The ability of a class to inherit features from another class also makes object oriented programs more extensible.  For the same reason, even during construction, parts of the system under development can be refined without any major changes to other parts.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                   Readers if you want to learn more please revisit my blog and  please comment if you want improvement .  I m anxiously waiting for you comments

Wednesday, 15 May 2013

What is object oriented approach or object oriented language?

 What is object oriented approach or object oriented language?
             
                  Object Oriented Programming (OOP) is one of the popular methodologies in software development.  It offers a powerful model for creating computer programs.  It speeds the programming development process, improves maintenance, and enhances re-usability of programs.  Object orientation is a software development methodology that relates to the real world system. Object is the main thing in this methodology.  An object is the thing which can be seen, touch or feel logically and physically.  For example a Man, Bird, Car can be called as objects.  You can say object oriented model as collection of objects and relationship between them or each other.
               
                 THE FOUNDATION OF OBJECT ORIENTATION

An object oriented program consists of classes, objects, and methods.  Now i will make you understand each of them. Firstly we will see OBJECTS.

OBJECTS
           
          An  object means a 'material thing'  that can be presented physically.  In other words, an object is a touchable entity that may show some well defined behavior.  For example, consider the following statements in context of a tennis ball:
  •  A tennis ball is a touchable entity, with a visible boundary in physical terms.
  • A tennis ball has a specific defined purpose ( such as bouncing).
  • A tennis ball can be acted upon( such as can be hit with a racket or can be tossed around).
       But in software world the definition of object is not limited to merely something that can be seen, held and touched such as tennis ball or human non touchable things can be also considered as objects.  For example , in a car racing video game, the car is an object.  You can drive the car , turn the car , or stop the car when needed.  There are no visible boundaries when you are playing a video game.  Here everything is abstract.
        
       Now we will dig deep in OBJECTS 
        
       For example we will take the state, behavior and identity of object

STATE, BEHAVIOR AND IDENTITY OF AN OBJECT

An object has the following characteristics
  • It has a state that is indicated by a set of attributes and their values.
  • It may display behavior that is reflected by the change of its attributes over a period of time.
  • It has a unique identity, which distinguishes it from other objects.
For example, consider a bike as an object.  A bike has the following characteristics.
  • A bike can have various states, such as moving and stationary.
  • It can show various behaviors such as accelerating decelerating or turning.
  • It also has an identity, such as unique registration number.
Two objects may have same behaviors and states, but they never have the same identity.  The identity of an object does not change in its lifetime.  for example two tennis ball have the same color, be made of same material, have same weight and display the same behavior.  However , they will have distinct identities

CLASSES

Look at the world around you.  It is full of objects of various shapes, sizes, colors and behaviors.

              For example, there are millions of animals on earth.  All animals and birds, which are essentially objects can be classified on the basis of common attributes. For example, the peacock, the sparrow, and the kingfisher are all birds.  All of them share characteristics that are common to the family of birds.  All of them lay eggs, have feathers, have hollow bone structures, and have the ability to fly.  Therefore, they share structural and behavioral similarities and belong to the class called Birds.

             Similarly, objects such as truck, a van, a sports car, and a bus are kind of vehicles.  Therefore, all these objects belong to the class, Vehicle.


MESSAGES AND METHODS
         
           Objects do not exist alone.  Means they communicate with other objects.  These communications take place through messages.  Grady Booch has defined behavior as , "Behavior is how an object acts and reacts, in terms of its state changes and message passing."
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           Readers if you want to know more about programming then please read and please comment 

Tuesday, 14 May 2013

C# - a Powerful Object Oriented Language

C# - pronounced it as C - Sharp is an object oriented language by Microsoft.  In the subsequent post i would be showing you how to write good, interactive and real life programs in C - Sharp.  But why we need to learn language,  its a question?  As computer only understand binary language that is set of 0 and 1.  Here 0 means absence of voltage or voltage under 5 volt and 1 means presence of voltage or voltage above 5 volt.  So once it is started  whatever we do on computer, generates a signal with every click we make on keyboard or mouse. Computer is basically a lump of metal, without its software.  We create software from third or fourth generation languages.  Mostly C is used.  With its software, a computer can store, process, and engage or retrieve information, find spelling errors in manuscripts, play adventure, and engage in many other valuable activities to earn its keep.  Computer software can be roughly divided into two kinds: the system programs, which manage the operation of the computer itself, and the application programs, which solve problems for their users.   We are going to create application programs which run on system programs or solve the users problem in a good manner.   So by not wasting your any time i will start teaching you how to write programs in c Sharp language.


           FOR Learning C Sharp language i presume that you have already knew some or anyone 3rd Generation Language for example C Language.  OK IF you don't know i will give a short note on C language.  C language is a third generation language used in system programming because they have powerful features such as low level access to memory.  Similarly, high level languages are used for application programming because they are flexible and easy to use.  C language combines the power of low-level languages and the flexibility and simplicity of high-level languages. Therefore, it is a widely used computer language. 
Now  let us see some history of  language:
         Computer languages have come along way since the 1940s.  During that period, scientists punched instructions into large, room sized computer systems.  These instructions were long series of zeroes and ones.  These machine language instructions, executed directly by the CPU, are called the First Generation of computer languages.
          The 1950s saw the emergence of the Second Generation of computer languages- assembly language.  Assembly language is easier to write than machine language but still extremely complicated for a common man.  However, the computer could still understand only machine language.  Therefore, the Assembler software was developed to translate the code written in assembly language into machine language.
           In 1967, Martin Richard developed a language called BPCL for writing operating systems.  An operating system is a set of programs that manages the resources of a computer and its interactions with users.  The era of the Third Generation of computer languages had arrived.  In 1970, KEN THOMPSON modified BPCL to create a new language called B.  While working for Bell Laboratories, Thompson teamed up with DENNIS RITCHIE and wrote an initial version of the Unix operating system for a DEC PDP-7 computer.
           Dennis Ritchie was working on a project to further develop the Unix operating system.  He wanted a low level language, like the assembly language, that could control hardware efficiently.  At the same time, he wanted the language to provide the features of a performace drawbacks, so in 1972 he wrote B and called it C.  Therefore, C is categorized as both a Second and Third Generation language.  Thompson and Ritchie rewote the Unix operating system in C.  In the years that followed, C was widely accepted and used over different hardware platforms.  This led to many variations of C.  In 1989, the American National Standards Institute (ANSI), along with the International Standard Organization, approved a machine independent and standard version of C.
           
           In the early 1980s , Bjarne Stroustrup of Bell Labs developed the C++ language.  C++ was originally known as  'C with Classes' because two languages contributed to its design: C, which provided low level features, and Simule67, which provide the class concept, C++ is an object oriented language.  Other object oriented languages are Java , Smaltalk and C#.
           
            C# is a programming language introduced by Microsoft.  C# is an object oriented programming.  It contains features similar to Java and C++.  IT is specially designed to work with Microsoft's .NET platform.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            Readers Thanks for visiting  i m anxiously  waiting for your comment, please comment.