Browse by Tags

All Tags » DevCenterPost » .NET Development (RSS)

Overcoming problems with MethodInfo.Invoke of methods with by-reference value type arguments

I ran into an interesting problem on the Forums recently. Basically, when you use MethodInfo.Invoke to invoke a method with by-reference value type arguments you can't have the invoked method update a variable/argument. The problem is, when you invoke...

Upcoming C# 3 Guidance From Microsoft

Mircea Trofin has some design guidelines with regard to some C# 3 language additions (that I assume will make it into a revised Framework Design Guidelines of some sort). They more less agree with the guidelines I published in Code Magazine a while ago...

"Object is currently in use elsewhere" error.

I was debugging what I thought was a strange exception the other day. The exception was an InvalidOperationException and the message was "Object is currently in use elsewhere". Unless you're familiar with this exception, it really doesn't...

Formatting/parsing for a specific culture redux

In recent blog post I detailed how creating a culture via the CultureInfo constructor could actually create a user-overridden culture--which could be completely different than the culture that you've requested by name. Fortunately there's a way...

Formatting/parsing for a specific culture

Sometimes you may want to use a specific format for formatting and parsing of textual data. The easiest way to do this is to select a specific culture and use that with formatting and parsing methods. Unfortunately, the CultureInfo constructor that just...