Mrrm, gotta love .NET
-
This isn't a new annoyance. Just every time I have to deal with it I get all riled up. In the C# language
true
falsebut
true.ToString() == "True"
false.ToString() == "False"Of course xml is "true" and "false" http://www.w3.org/TR/xmlschema-2/#boolean[^] Whomever At Microsoft Decided That Everything No Matter What Should Start With A Capital Letter Should Be Dragged Outside And Shot.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego. -
This isn't a new annoyance. Just every time I have to deal with it I get all riled up. In the C# language
true
falsebut
true.ToString() == "True"
false.ToString() == "False"Of course xml is "true" and "false" http://www.w3.org/TR/xmlschema-2/#boolean[^] Whomever At Microsoft Decided That Everything No Matter What Should Start With A Capital Letter Should Be Dragged Outside And Shot.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.I think it was the VB team who must have done this.
-
This isn't a new annoyance. Just every time I have to deal with it I get all riled up. In the C# language
true
falsebut
true.ToString() == "True"
false.ToString() == "False"Of course xml is "true" and "false" http://www.w3.org/TR/xmlschema-2/#boolean[^] Whomever At Microsoft Decided That Everything No Matter What Should Start With A Capital Letter Should Be Dragged Outside And Shot.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.I would never do a string comparison that did not ignore case.
Christian Graus Driven to the arms of OSX by Vista.
-
I would never do a string comparison that did not ignore case.
Christian Graus Driven to the arms of OSX by Vista.
I am not doing a string comparison, if I were I would be using String.Compare. However, typing the comparison seemed to be the easiest way to illustrate the issue which turns into an absolute charlie foxtrot when doing web development. Of course that is probably my biggest problem right there. Why can't I just do windows forms and be done with the crap. (Or at least move on to other crap)
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego. -
This isn't a new annoyance. Just every time I have to deal with it I get all riled up. In the C# language
true
falsebut
true.ToString() == "True"
false.ToString() == "False"Of course xml is "true" and "false" http://www.w3.org/TR/xmlschema-2/#boolean[^] Whomever At Microsoft Decided That Everything No Matter What Should Start With A Capital Letter Should Be Dragged Outside And Shot.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.The real problem is not that ToString returns "True" and "False". Rather I think the real issue us that there is no way to get a culture specific string from a Boolean. even
ToString(IFormatProvider )
ignores culture. -
I am not doing a string comparison, if I were I would be using String.Compare. However, typing the comparison seemed to be the easiest way to illustrate the issue which turns into an absolute charlie foxtrot when doing web development. Of course that is probably my biggest problem right there. Why can't I just do windows forms and be done with the crap. (Or at least move on to other crap)
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.:confused: What has web development to do with Boolean string representation (and howis it not significant in windows forms development)?
-
:confused: What has web development to do with Boolean string representation (and howis it not significant in windows forms development)?
In windows development you can and should always use the Boolean object. In web development you must constantly switch between object and string representation. I have a lot of casing rants with respect to ASP.NET however.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego. -
This isn't a new annoyance. Just every time I have to deal with it I get all riled up. In the C# language
true
falsebut
true.ToString() == "True"
false.ToString() == "False"Of course xml is "true" and "false" http://www.w3.org/TR/xmlschema-2/#boolean[^] Whomever At Microsoft Decided That Everything No Matter What Should Start With A Capital Letter Should Be Dragged Outside And Shot.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.If you're using XML, use System.Xml.XmlConvert[^] instead of the normal conversions.
-
This isn't a new annoyance. Just every time I have to deal with it I get all riled up. In the C# language
true
falsebut
true.ToString() == "True"
false.ToString() == "False"Of course xml is "true" and "false" http://www.w3.org/TR/xmlschema-2/#boolean[^] Whomever At Microsoft Decided That Everything No Matter What Should Start With A Capital Letter Should Be Dragged Outside And Shot.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.Ennis Ray Lynch, Jr. wrote:
gotta love .NET
You don't HAVE to love .NET... But I do. It is warm and fuzzy :-D
* Developer Day Scotland 2 - Free community conference * The Blog of Colin Angus Mackay
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
-
The real problem is not that ToString returns "True" and "False". Rather I think the real issue us that there is no way to get a culture specific string from a Boolean. even
ToString(IFormatProvider )
ignores culture. -
This isn't a new annoyance. Just every time I have to deal with it I get all riled up. In the C# language
true
falsebut
true.ToString() == "True"
false.ToString() == "False"Of course xml is "true" and "false" http://www.w3.org/TR/xmlschema-2/#boolean[^] Whomever At Microsoft Decided That Everything No Matter What Should Start With A Capital Letter Should Be Dragged Outside And Shot.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego. -
TypeConverter
is your friend :)xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 beta 1 - out now!
((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))leppie wrote:
TypeConverter is your friend
He's not mine - I beat the crap out of him when he refused to stand his round. Cheap b4st4rd.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
-
This isn't a new annoyance. Just every time I have to deal with it I get all riled up. In the C# language
true
falsebut
true.ToString() == "True"
false.ToString() == "False"Of course xml is "true" and "false" http://www.w3.org/TR/xmlschema-2/#boolean[^] Whomever At Microsoft Decided That Everything No Matter What Should Start With A Capital Letter Should Be Dragged Outside And Shot.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.I am sooo with you on that. :mad:
-
In windows development you can and should always use the Boolean object. In web development you must constantly switch between object and string representation. I have a lot of casing rants with respect to ASP.NET however.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego. -
leppie wrote:
TypeConverter is your friend
He's not mine - I beat the crap out of him when he refused to stand his round. Cheap b4st4rd.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
Pete O'Hanlon wrote:
He's not mine
"He"? I thought we all agreed that all BCL converter classes are female, Pete? And then you go ahead and disregard that! :|
Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
My latest book : C++/CLI in Action / Amazon.com link -
Pete O'Hanlon wrote:
He's not mine
"He"? I thought we all agreed that all BCL converter classes are female, Pete? And then you go ahead and disregard that! :|
Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
My latest book : C++/CLI in Action / Amazon.com linkNishant Sivakumar wrote:
I thought we all agreed that all BCL converter classes are female, Pete? And then you go ahead and disregard that!
No female would be so stupid as to get between me and my drink. Period. Add your own punchlines.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
-
I would never do a string comparison that did not ignore case.
Christian Graus Driven to the arms of OSX by Vista.
I would never do the opposite. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
The real problem is not that ToString returns "True" and "False". Rather I think the real issue us that there is no way to get a culture specific string from a Boolean. even
ToString(IFormatProvider )
ignores culture.Ah, so you want the ability to have: true == ":thumbsup:" and false == ":thumbsdown:"
-
The real problem is not that ToString returns "True" and "False". Rather I think the real issue us that there is no way to get a culture specific string from a Boolean. even
ToString(IFormatProvider )
ignores culture.Which reminds me that C had it right from the begining.
#define FALSE 0
#define TRUE !FALSEI believe we can all agree to that and let our cultural differences aside.. :)
-
This isn't a new annoyance. Just every time I have to deal with it I get all riled up. In the C# language
true
falsebut
true.ToString() == "True"
false.ToString() == "False"Of course xml is "true" and "false" http://www.w3.org/TR/xmlschema-2/#boolean[^] Whomever At Microsoft Decided That Everything No Matter What Should Start With A Capital Letter Should Be Dragged Outside And Shot.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.Just go with the flow, accept most human endevours are flawed and avoid fundementalism.