C # Learning note day One
Chapter 1 C # Overview
1.1 C # Overview
C # is a Microsoft-designed, concise, type-safe, object-oriented language. It is based on C + + . Its development environment is Visual Studio, the latest version is c#4.0
C # must run on the . NET Framework , andthe. NET Framework consists primarily of two components: the common language runtime, . NET Framework class Library.
1.2 paired with the visual stdio development Environment
Click Next to continue.
1.3 Creating the first Console application
(1) On the Start page Select, create a new project, this link
(2) Select Console Application
(3) Set the name and file location.
(4) Press f5 or run icon to run
1.4 Creating the first Windows Forms application
(1) on the Start page Select, create a new project, this link
(2) Select Windows Form Application Program
(3) set the name and location of the file
(4) Press f5 or run the icon to run it
Chapter 2 C # Basic Concepts
2.1 Creating the Hello World application Program
Here are a few basic concepts
(1) Class: Abstract a group of objects of the same nature into a class, is a concept of logical abstraction, can include a variety of member variables, such as: Fields, constants and methods
(2) Object: An object is a specific thing, an instance of a class that can invoke an instance field and method of a class through an object
(3) Method: It is a member of a class, is a block of code containing a series of statements, you can change the state of the object
(4) Main () method: Called the Main method, is the entry of all programs run, the rest of the methods are divided into parameters and no parameters are called, if the call is a function with parameters, then the parameters are passed at the time of the call
(5) Namespaces: Defines a declaration area that provides a way to differentiate between a set of names and another set of names, a namespace's declared name does not conflict with the same name of another namespace, and a using can introduce a namespace
Example:using System// This introduces the system namespace
The first program written is HelloWorld as follows:
C # Learning Note day_one