C # Sharp Experience

Source: Internet
Author: User
Tags exception handling

Preface

The C # language is a simple, modern, elegant, object-oriented, type-safe, platform-independent new component programming language. Its grammatical style derives from the C/s + + family, combines Visual Basic with high efficiency and powerful, and is the mainstream language of Microsoft's Microsoft.NET platform built to lay its next internet hegemony. It was launched by its powerful operational capabilities, elegant grammar style, innovative language features, first, such as component-oriented programming support and well received by programmers around the world praise and love. "It's the computer language I've been dreaming of for years!" "-many senior programmers are surprised to get C #. From the C # language name (c Sharp) We can also see Microsoft's ambition to build its next-generation Internet depth service. The C # language has now been submitted by Microsoft to the European Computer Manufacturers Association (ECMA), and a standardized C # will enable any vendor to implement its development tools and supporting software on any platform, which provides a powerful driving force for the development of C #, and we can see Microsoft's unprecedented vision and wisdom here.

Component programming has become a consistent choice for the next Generation program development in the World software industry, and it is the deep development of object-oriented programming in the 90 's. C # when it comes to life, the best of all time, "first-level component-oriented programming support" is by no means easy to say. In fact, component features have been deeply embedded in the C # language at all levels and are a sharp (Sharp) for C #. In the following article, I will be from the C # language to show the various aspects of the C # language of the ubiquitous component features, in-depth elaboration of C # component-oriented programming. The whole topic is divided into ten lectures: "The first lecture ' hello,world! "Program", "second, Introduction to C # language Basics", "the third is about Microsoft.NET platform infrastructure", "" Class and Object "," v Constructors and Destructors "," sixth Method "," Seventh domain and attribute "," eighth indexer and operator overload "," Nineth "Array and string "," tenth speaks features and mappings "," 11th speaks COM Interop unmanaged programming with exception handling "," 12th talk about C # weaving future--c# Programming Model Overview ".

The first lecture "hello,world! "Program

"Hello world!" Program is a programmer has always been a romantic agreement, but also a great dream-one day, from the human hand of the computer will face this beautiful world to say "Hello world!." It's a good starting point for learning a new language, so let's start with the following examples:

//HelloWorld.cs by Cornfield,2001
file://csc HelloWorld.cs
using System;
class HelloWorld
{
public static void Main()
{
Console.WriteLine("Hello World !");
}
}

We can write this code by turning on the simple Notepad program that comes with Windows--the author recommends a fairly straightforward editing tool that is very simple to expose the program code at first. We save its filename as HelloWorld.cs, where ". cs" is the extension of the C # source code file. Then type "csc HelloWorld.cs" to compile the file in the command line environment that is configured with the C # compiler. You can see the compile output file HelloWorld.exe. We type HelloWorld to execute this file to get the following output:

Hello World!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.