Thursday, 24 September 2015

A SIMPLE C# PROGRAM

Program:P1:/*here is very simple program in c#*/
class SimpleProg
{
    public static void Main()
    {
        System.Console.WriteLine("Simple program in c#");
    }
}

SO,
C# is an object oriented language therefore everything must be placed inside a class.
Its a block-structured language so,code blocks are alwys enclosed in braces { & }.
Here in c# the M of Main keyword should be capital,Public is an access modifier and static declares that Main method is a global and can be called without creating an instance of the class.
The out put line:
                                     System.Console.WriteLine("Simple program in c#");
where WriteLine is a static method of the Console class,which is located in the namespace System.Also every C# statement must end with a semicolon(;).
And // used for single line commants where /*........*/ used for multiline commants.

.NET(dot NET):THE C# ENVIRONMENT

.NET(dot net) is a framework that includes everythng required for developing software for web services developed by microsoft primarily run on windows.
It consists of three distict technologies as:(1)common language runtime(2) Framework base classes(3)User and program interfaces.
It has a CLR(Comman Language Runtime),which provide the Interoperability with other languages

c#(C sharp)

hey friends!!...
here is the stuff for you.
Lets start with the c#.
I hope it will be helpful for you.
One of designer of C# that Wasanders Hejsberg was a developer of java.
So most of the features of java are there in the c#.
C#  contained concepts of C language,power that is component orientation of C++ and Elegance of java also the productivity of visual basic.
C# has many applications: Like (a)Console applications (b)Windows application (c) Providing web services (d)creating web controls and many more..