社区
VB
帖子详情
帮忙做个题,创建一个委托,在请求用户输入时,使用他模拟Console.ReadLine()函数
fbhao442679385
2008-07-18 09:03:36
用C#做。
...全文
159
2
打赏
收藏
帮忙做个题,创建一个委托,在请求用户输入时,使用他模拟Console.ReadLine()函数
用C#做。
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
2 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
NANCHENBAI
2011-03-03
打赏
举报
回复
class Program
{
delegate string ReadLineDelegate();
static void Main(string[] args)
{
ReadLineDelegate ReadLine=new ReadLineDelegate(Console.ReadLine);
Console.WriteLine("Type a string:");
string an= ReadLine();
Console.WriteLine("You typed: {0}", an);
}
}
dohteryrx
2010-07-12
打赏
举报
回复
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Practice_delegate_1_4
{
class Program
{
delegate void STR1(string str);
delegate string STR2();
static string ReadLine()
{
string str = Console.ReadLine();
return str;
}
static void WriteLine(string str)
{
Console.WriteLine(str);
}
static void Main()
{
STR1 strings = new STR1(WriteLine);
STR2 stringss = new STR2(ReadLine);
string str = stringss();
strings (str);
Console.ReadKey();
}
}
}
c#经典面试题目 (企业面试)
c#经典面试题目 或许会对你有所帮助c#经典面试题目 或许会对你有所帮助c#经典面试题目 或许会对你有所帮助c#经典面试题目 或许会对你有所帮助
6_8_3
创建一个
委托
,在
请求
用户
输入
时
,
使用
它
模拟
Console
.
ReadLine
()
函数
using System; using System.Collections.Generic; using System.Linq; using System.Text;namespace _6_8_3 { class Program { //创建 一个delegate delegate string ProcessDelegate(
【C# Lab】0001
委托
(delegate)
示例:
创建一个
委托
,在
用户
请求
输入
时
,
使用
它
模拟
Console
.
ReadLine
()
函数
using System; using static System.
Console
; namespace test { class Program { delegate string
ReadLine
Delegate(); static void Main(s...
c#入门经典(第三版) 练习6.8(3)
题目:
创建一个
委托
,在
请求
用户
输入
时
,
使用
它
模拟
Console
.
ReadLine
()
函数
。 代码: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; namespace Test ...
.NET 入门测试题四:
函数
(1) 下面两个
函数
都才能在错误,请指出这些错误. static bool Write() {
Console
.WriteLine("Text output from function."); } static void myFunction(string label,params int[] args,bool showLabel) { if(showLab...
VB
16,717
社区成员
110,522
社区内容
发帖
与我相关
我的任务
VB
VB技术相关讨论,主要为经典vb,即VB6.0
复制链接
扫一扫
分享
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章