2
System.InvalidOperationException:Värdet null kan inte tilldelas en medlem av typen System.Boolean eftersom den är en värdetyp som inte kan ha värdet null.

Thank you Microsoft, intentions are good, I know. As if anybody who really finds this information useful would also consider Swedish as the coding lingua franca. The Moldavians can just turn to Moldavian StackOverflow and post their queries for speedy help.

Does anybody know how to get these messages in English?

Martin
  • 2,956
  • 7
  • 30
  • 59
  • I don't think the language is Swedish, if thats what you were implying. – Anthony Forloney Feb 01 '10 at 14:42
  • 1
    @Anthony: Jodå, det är svenska. / Yes, it's swedish. – Guffa Feb 01 '10 at 14:45
  • Interesting, looked more German than anything, thank you. – Anthony Forloney Feb 01 '10 at 14:47
  • ä is a good tell along with your first intuition German. http://en.wikipedia.org/wiki/%C3%84 – Martin Feb 01 '10 at 15:00
  • Word length is a good tell for something NOT being German, btw. "som", "kan", "ha", "en" and "av" are all noticeably short for German and especially "är" is a word you'd never find near German. German has far fewer umlauts than most people seem to think. I think "kan" and "av" are good tells for the Nordic languages, too. – Alan Plum Feb 01 '10 at 15:32
  • I know alot of Swedes who think Häagen-Dazs is German though I assume the branders' intention was to give a Scandinavian feel. – Martin Feb 01 '10 at 15:41

2 Answers2

1

The exception messages are controlled by the thread's culture. You can find some workaround suggestions here.

Community
  • 1
  • 1
jarnbjo
  • 33,923
  • 7
  • 70
  • 94
  • There doesn't seem to be any great solutions to this. I'll just wait see if there has been any developments before giving you the accept. – Martin Feb 01 '10 at 14:57
  • 1
    No, the workarounds are not always useful. The problem is that the Exception class only has a single "Message" property, which according to the API documentation gives culture dependent details, at least for the .NET framework exceptions. Java on the other side has both a message and a localized message in the Throwable base class for exceptions, but unless overridden in a specific implementation, they map to the same internal value. – jarnbjo Feb 01 '10 at 15:40
0

Google translate gives us:

The value null can not be awarded to a member of type System.Boolean because it is a value type that can not be null value.

Edit: Event though this translation is not perfect it gives us a good idea of the problem. Here is my transalatio nof the translation ;-)

The value null cannot be assigned to a member of type System.Boolean because it is a value type that cannot be a null value.

For the record, I think only the Nullable<> value type can be assigned a null value.

Marcel Gosselin
  • 4,610
  • 2
  • 31
  • 54
  • 3
    Oops, maybe I accidentally overloaded the awarding operator. – Martin Feb 01 '10 at 14:54
  • No. The problem is Microsoft in this instance, but that's secondary to the question, which has a question mark, see above. – Martin Feb 01 '10 at 20:33