CSharpFeeds - All your C# feeds in one place.

Thursday, September 02, 2010

Parameters by reference

by luisabreu via LA.NET [EN] on 9/2/2010 9:28:49 AM

By default, parameters are always pass by value. However, the CLR does allow you to pass parameters by reference. In C#, you can use the out or ref keywords for passing parameters by reference. When the compiler sees that you’ve used these keywords, it will emit code that passes the *address* of the parameter rather than its value. Interestingly, these two keywords are identical from the CLR’s point of view. The story is completely different for the C# compiler since it uses them to see who is ...

[ read more ]

Don't let this get away

by skeet via Jon Skeet: Coding Blog on 9/2/2010 6:55:55 AM

Josh Twist asked me this via Twitter: is it possible to invoke a member before a ctor is finished (eg maybe using threaded IL trickery) or is this forbidden somehow? :D Now I don't know why everyone seems to think I enjoy writing code which could have bizarre effects on either you, the compiler, the resulting execution or your co-workers... but it's an interesting topic to look at, anyway. The perils of partially constructed objects Hopefully it's reasonably obvious why it ...

[ read more ]

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us