委托用于类型安全的表达式 [英] delegate is used for type safe expression

查看:102
本文介绍了委托用于类型安全的表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想问一下委托用于类型安全表达式,还是告诉我委托仅在c#中有什么用?

I want to ask that delegate is used for type safe expression or tell me what are the uses of delegates in c# only

推荐答案

您应该在某个时候尝试使用Google,它是一个出色的搜索引擎,几乎可以满足您的所有要求.

.NET委托是类型安全的,因为如果您尝试传递不与模式匹配"的委托方法,则会收到编译时错误方法与委托模式不匹配!".

此处:
代表键入安全类型 [
You should try Google sometime, it''s a great search engine having answer to almost everything you ask for.

.NET delegates are type safe because if you attempt to pass a method to delegate that does not "match the pattern", you will receive a compile time error "Method does not match delegate pattern!".

Here:
Uses of Delegate in C#[^]
Delegates type safe[^]


这篇关于委托用于类型安全的表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆