zoukankan      html  css  js  c++  java
  • c#入门经典(第三版) 练习6.8(3)

    题目:创建一个委托,在请求用户输入时,使用它模拟Console.ReadLine()函数。

    代码:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Text.RegularExpressions;
    
    namespace Test
    {
        class Program
        {
            delegate string processdelegate();
            static void Main(string[] args)
            {
                processdelegate process;
                process = new processdelegate(Console.ReadLine);
                string str = process();
                Console.WriteLine("输入的字符串:{0}",str);
                Console.ReadKey();
            }
        }
    }
  • 相关阅读:
    oracle中文乱码问题
    并发登录查询
    AJAX 笔记
    jQuery笔记
    js BOM 笔记
    HTML DOM笔记
    JS函数笔记
    js笔记
    json笔记
    css3笔记
  • 原文地址:https://www.cnblogs.com/593213556wuyubao/p/2754278.html
Copyright © 2011-2022 走看看