What does “+” mean in reflected FullName and '*' after Member c#

  • A+
Category:Languages

I'm currently dealing with reflection in c#. After:

Assembly.LoadFile(@"C:/Program Files/dotnet/shared/Microsoft.NETCore.App/2.0.7/System.Numerics.Vectors.dll").GetTypes() 

And i found this: [System.Numerics.Matrix4x4], [System.Numerics.Matrix4x4+CanonicalBasis], [System.Numerics.Matrix4x4+VectorBasis] (There are reflected types from "System.Numerics.Vectors.dll") I know that Matrix4x4 is structture, however I can't find any info about CanonicalBasis and VectorBasis, and what "+" means in this context. I was doing further research and another strange thing is that:

Assembly.LoadFile(@"C:/Program Files/dotnet/shared/Microsoft.NETCore.App/2.0.7/System.Numerics.Vectors.dll").GetType("System.Numerics.Matrix4x4+VectorBasis").FullName "System.Numerics.Matrix4x4+VectorBasis" 

But:

Assembly.LoadFile(@"C:/Program Files/dotnet/shared/Microsoft.NETCore.App/2.0.7/System.Numerics.Vectors.dll").GetType("System.Numerics.Matrix4x4+VectorBasis").Name "VectorBasis" 

Moreover, when I looked through members of Matrix4x4+VectorBasis there is member like this:

[System.Numerics.Vector3* Element0]  

And is it raw pointer like in c++? Or what is it?

P.S. I was doing it in c# interactive, but i don't think it had any influence on results.


The + between class names means that the part after the + is a nested type of the type which name is before the +. For example Dictionary<string, string>+KeyCollection. KeyCollection is an inner class of Dictionary<TKey, TValue>.

The * denotes a pointer indeed, since the field mentioned is in unsafe mode:

public unsafe Vector3* Element0; 

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: