什么是价值,什么是参考? [英] what is value and what is reference?

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

问题描述

什么是价值,什么是参考?
为什么枚举是值类型,为什么数组是引用类型?
值和引用之间的区别?

what is value and what is reference?
why enum is value type and why array is reference type?
difference between value and reference?

推荐答案

每当我们谈论持有指向存储值的位置的指针时,我们都在谈论引用.按值表示我们直接使用该值的时间-不涉及任何指针或引用.
Whenever we talk of holding a pointer to a location where the value is stored, we are talking about a reference. By value is when we are directly working with that value - no pointer or reference involved.


签入此处 [ ^ ].这主要是针对C#的,但是规则是相同的.
Check in here[^]. This is largely for C# but the rules are the same.


这些是Google可以轻松回答的问题.尝试将问题一一粘贴在Google上.
These are questions that are easily answered by Google. Try pasting your questions on Google one by one.


这篇关于什么是价值,什么是参考?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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