What are rvalues and lvalues in C#?

WBOY
Release: 2023-08-26 19:33:09
forward
1267 people have browsed it

C# 中的右值和左值是什么?

The following are the types of expressions in C# -

  • lvalue- Expressions that are lvalues can be displayed Is the left or right side of the assignment.

  • rvalue- An expression that is an rvalue can appear on the right-hand side, but not on the left-hand side of a right-hand assignment.

Variables are lvalues, so they may appear on the left side of an assignment. Numeric literals are rvalues, so they cannot be assigned, nor can they appear on the left-hand side.

This is a valid C# statement -

int a = 100:
Copy after login

The above is the detailed content of What are rvalues and lvalues in C#?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!