当前位置:首页 > C#教程 > C#进阶

C#进阶

C#使用for循环来计算阶乘

7

usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespacefactorial{classTest{staticvoidMai

C#位运算和位移运算符

13

usingSystem;namespaceMyApplication{classProgram{staticvoidMain(string[]args){inta=60;/*60=00111100*/intb=13;/*13=0000110

C#查找链表的节点

11

usingSystem;usingSystem.Collections.Generic;classProgram{staticvoidMain(){LinkedList<string>myList=newLinkedList&l

C#按位运算符

11

usingSystem;namespaceOperatorsAppl{classProgram{staticvoidMain(string[]args){inta=60;/*60=00111100*/intb=13;/*13=0000110

C#字符常量

7

usingSystem;namespaceEscapeChar{classProgram{staticvoidMain(string[]args){Console.WriteLine("HellotWorldnn");C

C#封装内部访问修饰符

9

usingSystem;namespaceRectangleApplication{classRectangle{//membervariablesinternaldoublelength;internaldoublewidth;doubl

C#将数字转换为单词

16

usingSystem;usingSystem.Collections.Generic;usingSystem.Text;namespaceDemo{classMyApplication{staticvoidMain(string[]arg

C#正则表达式示例3

10

usingSystem;usingSystem.Text.RegularExpressions;namespaceRegExApplication{classProgram{staticvoidMain(string[]args){stri

C#多级继承

10

usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceDemo{classSon:Father{publicvoidDi

C#接口

11

usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem;namespaceInterfaceApplication{publicinterf

C#按输出传递参数

8

usingSystem;namespaceCalculatorApplication{classNumberManipulator{publicvoidgetValue(outintx){inttemp=5;x=temp;}staticvo

C#重载索引器

15

usingSystem;namespaceIndexerApplication{classIndexedNames{privatestring[]namelist=newstring[size];staticpublicintsize=10

C#基本语法

10

usingSystem;namespaceRectangleApplication{classRectangle{//membervariablesdoublelength;doublewidth;publicvoidAcceptdetai

C#计算一个数字的总位数

15

usingSystem;publicclassDemo{publicstaticvoidMain(){uintval=12;//1100inbinaryuintres=(uint)Math.Log(val,2.0)+1;//1100has4

C#判断二进制是否是回文

10

usingSystem;publicclassDemo{publicstaticlongfuncReverse(longnum){longmyRev=0;while(num>0){myRev<<=1;if((num&

C#封装public访问修饰符

7

namespaceRectangleApplication{classRectangle{//membervariablespublicdoublelength;publicdoublewidth;publicdoubleGetArea()