C # ---- my first day

Source: Internet
Author: User

Author: mbreeze

Today, I finally calmed down to learn. Net technology. Because I have learned some basic C language, I decided to start from C #. NET.
. Net is a development platform. Defines a subset of CLS (common language subset) Public languages. XML is fully supported. Interconnect Networks to 3A, anytime, anywhere, and any device.
C # features Rapid Application Development (RAD)
VOS Virtual Object System
.......
First source program
Using System; // similar to # include

/*
Class Welcome // declare a class, which is Welcome
{
Static void Main () // indicates a method in the class Welcome.
{
Console. WriteLine ("Pleas enter your name ");
Console. ReadLine (); // accept input
Console. WriteLine ("Welcome You"); // The output shows column 1.
}
}
*/

/* Class Welcome // declare a class, which is Welcome
{# If // force the compiler to ignore source code snippets that contain comments and match the following endif
Static void Main () // indicates a method in the class Welcome.
{
Console. WriteLine ("Pleas enter your name ");
String name = Console. ReadLine ();
Console. WriteLine ("Welcome to You, {0 }! ", Name); // Example 2
} # Endif
}
*/

Class Welcome // declare a class, which is Welcome
{
Static void Main () // indicates a method in the class Welcome.
{
Console. WriteLine ("Pleas enter your name ");
String message = "Weclome you" + Console. ReadLine ();
Console. WriteLine (message); // The output display is basically the same as the preceding example.
}
}
ReadLine and WriteLine are added when the display is executed, and Read and Write are used, the cursor will not be automatically transferred to the next line.
The annotation methods are almost the same. // ****** indicates commenting a line /*..... */Indicates that comments are not compiled!
// Even the QQ: 77675761

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.