Click here to Skip to main content
15,898,222 members
Home / Discussions / C#
   

C#

 
QuestionConvert a Word file to pdf with microsoft office 2007 Pin
abbd13-Mar-09 2:02
abbd13-Mar-09 2:02 
AnswerRe: Convert a Word file to pdf with microsoft office 2007 Pin
Xmen Real 13-Mar-09 2:12
professional Xmen Real 13-Mar-09 2:12 
QuestionLoad font from a ttf file ! Pin
Mohammad Dayyan13-Mar-09 1:51
Mohammad Dayyan13-Mar-09 1:51 
AnswerRe: Load font from a ttf file ! Pin
Xmen Real 13-Mar-09 2:15
professional Xmen Real 13-Mar-09 2:15 
GeneralRe: Load font from a ttf file ! Pin
Mohammad Dayyan13-Mar-09 2:44
Mohammad Dayyan13-Mar-09 2:44 
QuestionHow to get file properties in Windows 7? Pin
psi_u13-Mar-09 0:53
psi_u13-Mar-09 0:53 
QuestionSync confusion Pin
J-Cop13-Mar-09 0:23
J-Cop13-Mar-09 0:23 
AnswerRe: Sync confusion Pin
Bharat Jain13-Mar-09 2:50
Bharat Jain13-Mar-09 2:50 
GeneralRe: Sync confusion Pin
J-Cop13-Mar-09 3:01
J-Cop13-Mar-09 3:01 
GeneralRe: Sync confusion Pin
Bharat Jain13-Mar-09 3:30
Bharat Jain13-Mar-09 3:30 
AnswerRe: Sync confusion Pin
Luc Pattyn13-Mar-09 2:56
sitebuilderLuc Pattyn13-Mar-09 2:56 
QuestionFrame CheckSum Calculation Problem Pin
ajorge200813-Mar-09 0:01
ajorge200813-Mar-09 0:01 
AnswerRe: Frame CheckSum Calculation Problem [modified] Pin
DaveyM6913-Mar-09 0:14
professionalDaveyM6913-Mar-09 0:14 
QuestionRegular expressions in C# Pin
KeithF12-Mar-09 23:28
KeithF12-Mar-09 23:28 
AnswerRe: Regular expressions in C# Pin
whaka12-Mar-09 23:48
whaka12-Mar-09 23:48 
AnswerRe: Regular expressions in C# Pin
psi_u13-Mar-09 1:05
psi_u13-Mar-09 1:05 
AnswerRe: Regular expressions in C# Pin
#realJSOP13-Mar-09 2:26
professional#realJSOP13-Mar-09 2:26 
Questionstring reference type? Pin
__DukeNukem__12-Mar-09 23:25
__DukeNukem__12-Mar-09 23:25 
AnswerRe: string reference type? Pin
DaveyM6912-Mar-09 23:37
professionalDaveyM6912-Mar-09 23:37 
GeneralRe: string reference type? Pin
__DukeNukem__12-Mar-09 23:45
__DukeNukem__12-Mar-09 23:45 
GeneralRe: string reference type? Pin
DaveyM6912-Mar-09 23:59
professionalDaveyM6912-Mar-09 23:59 
GeneralRe: string reference type? Pin
Luc Pattyn13-Mar-09 3:10
sitebuilderLuc Pattyn13-Mar-09 3:10 
Hi Dave,


DaveyM69 wrote:
a string ... is a null terminated char array - i.e. each character is stored in ajacent memory locations with a null character at the end to dertermine where the string finishes


Not so. That is true for C/C++ but not Java/C#.
How else would this snippet output "len=2":

char c='\0';  // or (char)0
string s="";
s=s+c;
s=s+c;
log("len="+s.Length);


I don't think we are supposed to even know *how* strings get stored, it suffices to know strings are collections of characters and there aren't any special characters, so NULL is handled like everything else.

The good thing is string.Length seems to be an O(1) operation. So it suggests a length+content implementation, as was used in Pascal.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


GeneralRe: string reference type? Pin
DaveyM6913-Mar-09 4:25
professionalDaveyM6913-Mar-09 4:25 
Questionvehicle tracking Pin
R.Krishnakumar12-Mar-09 23:14
R.Krishnakumar12-Mar-09 23:14 
AnswerRe: vehicle tracking Pin
Eddy Vluggen12-Mar-09 23:23
professionalEddy Vluggen12-Mar-09 23:23 

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.