end of string in C#
-
'\0' is the above command valid for calculating end of line in while loop... if not wat should be used to EOF identification
the quieter u become more u hear
-
'\0' is the above command valid for calculating end of line in while loop... if not wat should be used to EOF identification
the quieter u become more u hear
Hi, as far as I know does the .NET-Framework abstracts the issue of string termination. If you read from a file for example, you can use the StreamReader.ReadLine(). This will read a whole line... Regards Sebastian
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
-
'\0' is the above command valid for calculating end of line in while loop... if not wat should be used to EOF identification
the quieter u become more u hear
-
'\0' is the above command valid for calculating end of line in while loop... if not wat should be used to EOF identification
the quieter u become more u hear
lawrenceinba wrote:
'\0' is the above command valid for calculating end of line in while loop...
I have never seen any system where the NUL character is used as end of line. It's commonly used as end of string in systems that doesn't have a String object that keeps track of the length.
lawrenceinba wrote:
if not wat should be used to EOF identification
The '\x1a' character is the EOF marker, however .NET doesn't use any EOF marker. You should ask about what you are trying to do instead of asking about some obsolete techniques that doesn't apply to C#.
Despite everything, the person most likely to be fooling you next is yourself.
-
end of string
the quieter u become more u hear
-
lawrenceinba wrote:
'\0' is the above command valid for calculating end of line in while loop...
I have never seen any system where the NUL character is used as end of line. It's commonly used as end of string in systems that doesn't have a String object that keeps track of the length.
lawrenceinba wrote:
if not wat should be used to EOF identification
The '\x1a' character is the EOF marker, however .NET doesn't use any EOF marker. You should ask about what you are trying to do instead of asking about some obsolete techniques that doesn't apply to C#.
Despite everything, the person most likely to be fooling you next is yourself.
i'll give input to a while loop....it should exit at end of string this is what i need
the quieter u become more u hear
-
end of string
the quieter u become more u hear
-
i'll give input to a while loop....it should exit at end of string this is what i need
the quieter u become more u hear
If you want to loop through the characters in a string, you can use the enumerator or the Length property:
foreach (char c in daString) {
Console.WriteLine(c);
}for (int i = 0; i < daString.Length; i++) {
Console.WriteLine(daString[i]);
}Despite everything, the person most likely to be fooling you next is yourself.