Click here to Skip to main content
15,905,967 members
Home / Discussions / C#
   

C#

 
GeneralRe: char & string? Pin
CodingYoshi5-Jan-09 5:29
CodingYoshi5-Jan-09 5:29 
QuestionGeneric List-Getting rows and passing them as params to sproc Pin
kenny23454-Jan-09 1:48
kenny23454-Jan-09 1:48 
AnswerRe: Generic List-Getting rows and passing them as params to sproc Pin
Wendelius4-Jan-09 3:16
mentorWendelius4-Jan-09 3:16 
QuestionOne prolem of Axis set by using MS chart control Pin
Seraph_summer4-Jan-09 1:16
Seraph_summer4-Jan-09 1:16 
QuestionMessage Removed Pin
4-Jan-09 0:30
Fired.Fish.Gmail4-Jan-09 0:30 
AnswerRe: One Regular Expression Pin
User 66584-Jan-09 1:29
User 66584-Jan-09 1:29 
QuestionConvert.ToByte('Š') throws an exception Pin
lackonagy3-Jan-09 20:49
lackonagy3-Jan-09 20:49 
AnswerRe: Convert.ToByte('Š') throws an exception PinPopular
Dewald3-Jan-09 21:46
Dewald3-Jan-09 21:46 
lackonagy wrote:
I've looked up the 'Š' character in the ASCII chart and the ordinal value is 138.


On which ASCII chart did you look this up? The real ASCII[^]does not have anything greater than 127 as it is only a 7-bit character set. There are numerous variants of so-called Extended ASCII[^] to represent 8-bit character sets or even more but there is no universal standard and not all of these extended character sets even include the original 128 ASCII characters so it becomes a very slippery slope, as you have just found out.

I'm not sure why Delphi would have returned the ordinal value of 138 for the character 'Š' but I can only assume that it must be because your computer has specific regional settings which uses an extended ASCII character set in which 'Š' translates to 138. To the best of my knowledge the two most popular "extended ASCII" sets are CP437 and CP850, both in which the value 138 translates to 'è' (latin lower case E with grave accent).

In C# the ordinal value of a character is not the ASCII value as you are used to but the character's unicode value. For some more info on converting between character sets you might want to have a look at the Encoding Class[^].
AnswerRe: Convert.ToByte('Š') throws an exception Pin
Dragonfly_Lee4-Jan-09 22:03
Dragonfly_Lee4-Jan-09 22:03 
Questionhow to restrict only one instance to run at a time on one machine Pin
prasadbuddhika3-Jan-09 17:36
prasadbuddhika3-Jan-09 17:36 
AnswerRe: how to restrict only one instance to run at a time on one machine Pin
N a v a n e e t h3-Jan-09 18:06
N a v a n e e t h3-Jan-09 18:06 
GeneralRe: how to restrict only one instance to run at a time on one machine Pin
prasadbuddhika3-Jan-09 18:50
prasadbuddhika3-Jan-09 18:50 
GeneralRe: how to restrict only one instance to run at a time on one machine Pin
N a v a n e e t h3-Jan-09 19:42
N a v a n e e t h3-Jan-09 19:42 
QuestionRounding a float to the nearest int Pin
Tony Pottier3-Jan-09 13:38
Tony Pottier3-Jan-09 13:38 
AnswerRe: Rounding a float to the nearest int Pin
PIEBALDconsult3-Jan-09 13:46
mvePIEBALDconsult3-Jan-09 13:46 
QuestionRemote event update RichTextBox problem Pin
ZarazaPhd3-Jan-09 8:05
ZarazaPhd3-Jan-09 8:05 
GeneralRe: Remote event update RichTextBox problem Pin
Luc Pattyn3-Jan-09 8:51
sitebuilderLuc Pattyn3-Jan-09 8:51 
GeneralRe: Remote event update RichTextBox problem Pin
ZarazaPhd3-Jan-09 9:10
ZarazaPhd3-Jan-09 9:10 
GeneralRe: Remote event update RichTextBox problem Pin
Luc Pattyn3-Jan-09 9:44
sitebuilderLuc Pattyn3-Jan-09 9:44 
GeneralRe: Remote event update RichTextBox problem Pin
ZarazaPhd3-Jan-09 10:59
ZarazaPhd3-Jan-09 10:59 
GeneralRe: Remote event update RichTextBox problem Pin
Luc Pattyn3-Jan-09 11:34
sitebuilderLuc Pattyn3-Jan-09 11:34 
GeneralRe: Remote event update RichTextBox problem Pin
ZarazaPhd3-Jan-09 11:47
ZarazaPhd3-Jan-09 11:47 
GeneralRe: Remote event update RichTextBox problem Pin
Luc Pattyn3-Jan-09 12:20
sitebuilderLuc Pattyn3-Jan-09 12:20 
GeneralRe: Remote event update RichTextBox problem Pin
ZarazaPhd4-Jan-09 3:04
ZarazaPhd4-Jan-09 3:04 
QuestionUsing Type and ConstructorInfo: Can't understand why this doesn't work... Pin
pikmindoctor3-Jan-09 4:19
pikmindoctor3-Jan-09 4:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.