I'm new to C# and am reading code with /*!*/
in what seem like strange places. For instance class methods defined as:
protected override OptionsParser/*!*/ CreateOptionsParser() protected override void ParseHostOptions(string/*!*/[]/*!*/ args)
Unfortunately /*!*/
is not googleable. What does it mean?
A pointer is a variable that stores the memory address of another variable as its value. A pointer variable points to a data type (like int ) of the same type, and is created with the * operator.
In computer programming, a dereference operator, also known as an indirection operator, operates on a pointer variable. It returns the location value, or l-value in memory pointed to by the variable's value. In the C programming language, the deference operator is denoted with an asterisk (*).
Here, * is called dereference operator. This defines a pointer; a variable which stores the address of another variable is called a pointer. Pointers are said to point to the variable whose address they store.
It's likely an attempt to get Spec# style annotations into a non-Spec# build. The ! annotation in Spec# means the value is not-null. The author is likely trying to indicate that both the return values, args array and all of the elements in args are always non-null values.
Spec# Link:
Quick Spec# Overview:
Spec# is a .Net language created via a Microsoft Research Project. It is an extension of the C# language which attempts to embed code contracts into the type system. The most prominent are non-nullable types (indicated with ! after the type name), checked exceptions and pre/post conditions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With