views:

139

answers:

3

Hi all,

Where can I find the spec of CLR ? For example, I want to look at how is implemented in memory the object "ThreadStart".

Thanks.

+4  A: 

Not sure about the Spec but if you want to look at implementation details you may want to use Red-gate Reflector

Dean
A: 

is the common language infrastructure specification what you are looking for?

The page contains many links to things like the c# language specification and the CLI

Sam Holder
+3  A: 

The closest I'm aware of is ECMA-335 which is the CLI specification. However, you should be aware that the ECMA memory model is significantly weaker than the .NET one. (Where .NET is Microsoft's implementation of the CLI.)

I doubt that the CLI specifically mentions ThreadStart though - it's just another delegate. What are you particularly interested in about it?

Jon Skeet
I would like to see how is built an object like delegate in memory (its fields, methods, etc...).
Thomas
Well you *can* look at that with Reflector, but that will be implementation-specific - I wouldn't expect to find that information in a specification. You should also bear in mind that delegates have a sort of dual nature - you can view them in a multicast way, or you can consider what one "action" would have. You can see this in the Delegate.Method/Target properties and the MulticastDelegate.GetInvocationList method.
Jon Skeet