码迷,mamicode.com
首页 > Windows程序 > 详细

C# for Beginner

时间:2014-12-18 06:46:09      阅读:214      评论:0      收藏:0      [点我收藏+]

标签:ar   io   os   sp   for   strong   on   bs   cti   

session 1 Introduction

The struct of C# program:

namespace , class and Main method

what is namespace?

the namespace declaration, using System, indicates that you are using the System namespace.

A namespace is used to organize your code and is collection of classes, interfaces, structs,enums and delegates.

Main method is the entry point into your application

session 2 Reading and writing to a console

Reading from the console and Writing to the console

2 ways to write to console

a) Concatenation

b) Place holder syntax -Most Preffered

C# is case sensitive 

session 3  Built - in types

Boolean type --Only true or false

Integral Types --sbyte,byte,short,ushort,int,uint,long,ulong,char. how to know Integral Types Value? using MinValue and MaxValue property

Floating Types--float and double

Decimal Types

String Type

session 4 String type in c#

talk about escape \n,\‘,\" and etc. sometimes using @ to not escape

session 5 Common Operators in c#

Assignment operator =

Arithmetic operator +,-,*,/,%

Comparison operator like == , != , > , >= , < <=

Conditional operator like && , ||

Ternary operator ?:

Null coalescing operator ?? 

C# for Beginner

标签:ar   io   os   sp   for   strong   on   bs   cti   

原文地址:http://www.cnblogs.com/gester/p/4170852.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!