Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the other operators supported by C #

Shulou Source: shulou.com Published: 2022-06-01 02:06:35 11月11日 Update

This article mainly introduces the relevant knowledge of other operators supported by C#, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this article on other operators supported by C#. Let's take a look.

Other operators

The following table lists some other important operators supported by C #, including sizeof, typeof, and?:.

The operator describes the size of the data type returned by the instance sizeof (). Sizeof (int), which returns the type of 4.typeof () that returns class. Typeof (StreamReader); & returns the address of the variable. & a; will get the actual address of the variable. * pointer to the variable. * a; will point to a variable. Conditional expression if the condition is true? Otherwise, determine for Yis whether the object is of a certain type. If (Ford is Car) / / checks whether Ford is an object of the Car class. As casts, and no exception is thrown even if the conversion fails. Object obj = new StringReader ("Hello")

StringReader r = obj as StringReader;, this is the end of the article on "what are the other operators supported by C #?" Thank you for reading! I believe you all have a certain understanding of "what are the other operators supported by C#". If you want to learn more, you are welcome to follow the industry information channel.

Tags: Operators operations clocks support variables knowledge types content addresses objects conditions articles importance value size instances reality points pointers simple operation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker macOS Xiaomi MariaDB OPPO Reno