Reputation
Top tag
Next privilege 125 Rep.
Vote down
Badges
4
Impact
~199 people reached

  • 0 posts edited
  • 1 helpful flag
  • 5 votes cast
Feb
23
awarded  Citizen Patrol
Feb
23
awarded  Commentator
Feb
23
comment General term for T[], T*, and T&
Let us continue this discussion in chat.
Feb
23
comment General term for T[], T*, and T&
@RobertHarvey Apparently I am making this much more confusing for people who aren't used to T& notation. Unfortunately, there is no CIL tag.
Feb
23
comment General term for T[], T*, and T&
@RobertHarvey csharppad.com/gist/7b7474dc3cfca4f7e0c1 for the .NET Type.ToString and ECMA-335 page 122 lists "Type ‘&’".
Feb
23
comment General term for T[], T*, and T&
@RobertHarvey The location of the ampersand is quite an important fact. An ampersand before a variable is indeed the "adress of" operator, which is present in both C# and C++. However, an ampersand after a type marks a byref type in .NET methods and CIL (not in C#, where it is marked with ref before it). Hope I've made it clear.
Feb
23
comment General term for T[], T*, and T&
@RobertHarvey Where? In ECMA it is called a managed pointer, and ByRef in the CLI.
Feb
23
comment General term for T[], T*, and T&
@RobertHarvey Pointers are T*, not T&. And T[] is not a pointer (usually).
Feb
23
awarded  Editor
Feb
23
revised General term for T[], T*, and T&
added 84 characters in body
Feb
23
comment General term for T[], T*, and T&
@DocBrown T& exists in .NET and CIL as a kind of pointer, and this question is also tagged .NET (maybe should I change it to ref T?). I need the generic term because all these types share that GetElementType method, which categorizes them in a way.
Feb
23
comment General term for T[], T*, and T&
@RobertHarvey He probably meant references (also known as managed pointers and byrefs), not reference types. C# supports references in a very limited way, only via ref parameters and arguments. However, .NET fully supports manipulation with references like C++.
Feb
23
comment General term for T[], T*, and T&
@PreferenceBean There are apparently compound or composite types, composite types encompassing user-defined classes, structs, and also arrays, while compound types just classes and structs. It's a mess anyway. Pointers etc. aren't really composite, because they can't be broken down into smaller typed units, although they are based on a type.
Feb
23
revised General term for T[], T*, and T&
edited tags
Feb
23
comment General term for T[], T*, and T&
@PreferenceBean If I remember correctly, classes and structs are called compound types by the specification.
Feb
23
asked General term for T[], T*, and T&
Jan
6
awarded  Supporter