Notes-C sharp language


Introduction to C#

C# is simple,modern,object oriented and type safe programming language derived from c and c++.It was developed by a small team led by two microsoft engineers Anders Hejlsberg and Scott Wiltamuth.Anders Hejlsberg also known for creating Turbo Pascal.C# support .net framework.It is similar to java.C# is powerful language for asp.net

Structure of C# program

using statements; //to use library files
class nis //class declaration
{
public static void Main() //main method
{
//programming statements
}
} //class end

Example of C# program

using System;
class WelcomeNis
{
public static void Main()
{
Console.WriteLine(“welcome Nisha”);
Console.ReadLine();
}
}

output:-

welcome Nisha

Modular Programming

A method in which long programs are divided into smaller program or modules that can be designed,coded and debugged separately with a minimum amount of interaction.It’s characteristics/features are as follows-

*Each module should do only one thing

*Communication between modules is allowed only by a calling module

*Module can be called by one higher module only

*No communication can take place directly between modules that do not have calling called relationship

*All modules are designed as single entry,single exit systems using control structures