自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 利用委托和观察者模式模拟热水器,当水温超过95度的时候,扬声器会发出语音, 液晶屏也会改变水温,提示水快烧开了?

public class Program    {        static void Main(string[] args)        {            LoudSpeaker loudSpeaker = new LoudSpeaker();            Displayer displayer = new Displayer();            loudSpeak...

2018-04-22 21:29:22 772

原创 利用委托和递归计算两个数之间所有数字的和?

 class Program    {        static void Main(string[] args)        {            Func<int, int, int, int> Sum = null;            Sum = (start, end, result) =>            {                if (st...

2018-04-19 22:08:09 614

原创 利用委托,模拟书店的简易运营过程,比如添加书到数据库,打印书籍作者,输出书籍的平均价格?

     class Program    {        static void Main(string[] args)        {            Library<Book> library = new Library<Book>();            Book book1 = new Book("斗罗大陆", "唐家三少", 21);       ...

2018-04-19 21:59:48 239

原创 自定义泛型集合,分别实现增删改查和排序操作?

 class Program    {        static void Main(string[] args)        {            Custom<string> custom = new Custom<string>();            custom.Add("456");            custom.Add("123");    ...

2018-04-19 10:57:47 2516

原创 分别利用List和ArrayList做一个小型的学生管理系统,实现添加学生和查询学生等功能?

class Program    {        static void Main(string[] args)        {            //创建学生实例            Student student1 = new Student("小明", "研7", "unity3D", "001");            Student student2 = new Studen...

2018-04-17 10:57:56 4812

原创 不同维度不同类型的数组统一方法排序?

class Program    {        static void Main(string[] args)        {            int[]  ray = { 78, 2, 43, 21, 1 };            int[,] arr = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } };            ArrayList...

2018-04-16 14:43:33 912

原创 斐波那契(Fibonacci)三种编程算法,数组法、循环法和递归法?

    class Program    {        static void Main(string[] args)        {            ArryFunc(10);            LoopFunc(10);            int a;            while (true)            {                a = Conve...

2018-04-11 17:28:47 629

原创 模拟动态数组,触摸数组的底层?

 class Program    {        static void Main(string[] args)        {            MyList<int> a = new MyList<int>();            a.Add(2);            a.Add(6);            a.Add(10);           ...

2018-04-11 16:15:57 130

原创 两个数求最大值、三个数求最大值 、n个数求最大值,求最小值同理?

class Program    {        static void Main(string[] args)        {            //1.两个数求最大值            Max(3,5);            //2.三个数求最大值            Max(3,5,9);            //3.n个数求最大值            Max(3,5,9...

2018-04-10 16:00:37 1933

原创 同一维度不同类型的数组运用泛型冒泡排序?

class Program    {        static void Main(string[] args)        {            string[] a = { "123","456","789"};            //1.委托解决方案调用            SortDel.Sort(a, (string c,string b)=> { return c....

2018-04-10 15:08:09 234

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除