0

I take the project Newtonsoft from git and compile it.

When I open the assembly dll and I check some of the full method names (full method name mean return type of the method + namespace + class + method) I see that some of the full method names are with a slash in different places. its can be in the middle of the return type, can be on the namespace, or in the middle of the parameters

When I get into the code of that method I don't find any 'rule' for this.

can anyone explain why it contains the slash?

( .net core 6.0 )

enter image description hereenter image description here enter image description here

enter image description here

Yanshof
  • 9,659
  • 21
  • 95
  • 195
  • 2
    You might want to edit your title - / is a forward slash, not a backslash. – Jon Skeet Sep 29 '22 at 18:28
  • @JonSkeet yes.. thanks - i fix it - but the main idea of my issue is clear? – Yanshof Sep 29 '22 at 18:43
  • 1
    Yes, but I don't know the answer offhand and I'm not in a position to research it right now. – Jon Skeet Sep 29 '22 at 18:46
  • @JonSkeet for research - you need simply use the ICorProfilerInfo. i put on the JITCompilationStarted some code that investigates the method by drill down into the IMetaDataImport ( GetFunctionInfo and GetMethodProps ) this will show the break of the method string - the reason is this slash in the middle of the string that those method return – Yanshof Sep 29 '22 at 18:52
  • ILSpy appears to use / for nested types. That's not the standard approach, the CLR uses + – Hans Passant Sep 30 '22 at 09:45
  • @HansPassant: No always - this appears also on the function that is not only nested type. And there are many nested types that appear without slash. But this appears not only on ilspy - its the information that returns from the method IMetaDataImport :: GetMethodProps that means that the position of the slash will be cut and the string of the method will be cut – Yanshof Sep 30 '22 at 13:47
  • Hard to decode that comment. The examples you posted are all type names, not method names. The "will be cut" comment might have something to do with you using IMetaDataImport, a .NET 1.x interface. It can't work for generic types/methods, they were added in .NET 2.0 and requires IMetaDataImport2. If you see angle brackets or !0 in a name then it uses generics. – Hans Passant Sep 30 '22 at 14:08
  • @HansPassant: this does not have any connection to !0 ( generic symbols ). on IMetaData is happened and also on IMetaData ( thay same - just more function on 2 ). I believe its Microsoft bug because i try many ways to find different solutions just when you see the slash - you will get all the strings from the slash - and you expect to get the full name or params or return value name. but the slash makes it cut – Yanshof Sep 30 '22 at 14:31

0 Answers0