Zafar Anwar

Zafar Anwar

  • NA
  • 1
  • 0

Single speacl quote char in C# String.

Jun 1 2012 6:49 AM
Hi All,

I have a question. Could you please let me know the reason for the following two characters?

1) ' = 8217 - Ascii value, binary value 10000000011001
2) ' = 39  - Ascii value, binary value 100111

A) Why do programmers delete non-ascii or on-printable characters from a string when we can store and print them?

we can store (1) as string1 = "Doesn't matter"; and also print it.
we can store (2) as string2 = "Doesn't matter"; and also print it.

B) If (1) gets stored in a string, what format does the .net framework system stores it internally?
C) if (1) gets compared with other string, what format does the system represent the string in before actual comparison?

Could anyone please let me know at the earlier?

Thank you so much!

Answers (1)