什么是“->"用C#表示 [英] what is "- >" in C# mean

查看:148
本文介绍了什么是“->"用C#表示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C#中的->"运算符是什么意思

what does "- > " operator in C# mean

推荐答案

那是解引用运算符(->),其工作原理与在C ++中使用相同的运算符.它用于通过指针访问类或结构的成员和方法.在C#中,您只能在不安全的代码中使用指针,因此在正常情况下,您将不会遇到指针,也不必过于频繁地取消引用它们.
That''s the dereference operator (->), which works very similar to the same operator in C++. It is used to access member and methods of a class or structure over a pointer. In C# you can use pointers in unsafe code only, so under normal conditions you will not encounter pointers and the need to dereference them too often.


我认为您的意思是"=>" '.
用于Lambda表达式
这是MSDN的报价:
"lambda表达式是一个匿名函数,可以包含表达式和语句,并且可以用于创建委托或表达式树类型."
可能我建议:
在C#中探索Lambda表达式 [ Lambda @ MSDN [
I think you mean ''=>''.
It''s used for Lambda expressions
Here''s a quote from MSDN:
"A lambda expression is an anonymous function that can contain expressions and statements, and can be used to create delegates or expression tree types."
Might I recommend:
Exploring Lambda Expression in C#[^]
and
Lambda @ MSDN[^]


Steven.Pinto写道:
Steven.Pinto wrote:

C#中的->"运算符是什么意思

what does "-- > " operator in C# mean


语法错误!
:-)


Syntax error!
:-)


这篇关于什么是“->"用C#表示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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