Re: Console.WriteLine(s) Is Missing Line Terminator?



On Fri, 17 Nov 2006 21:46:44 +0100, Mattias Sjögren wrote:


1) Level is missing from the output - It only contains InfoString. For
instance: When Level = "INFO", and InforString = "Process started", The
output is "Process started" only;
2) No newline character at the end.

Any advice on what it going on and how to get this resolved? Thanks!

Can you post a small complete application that will let us reproduce
the behaviour you're seeing? Console.WriteLine has always worked fine
here so I suspect your input is incorrect.


Mattias

Also as a rule of thumb, avoid using '&' to concatenate strings, as it has
a tendency to hide casting errors. It's only in there for VB6 style
compatibility, and should be burned at the stake along with Option Explicit
Off :)

Try placing a breakpoint on the Console.WriteLine statement and see what
the variable 's' contains. Perhaps you're passing control characters on the
end?

Cheers,
Gadget
.



Relevant Pages

  • Re: Console.WriteLine(s) Is Missing Line Terminator?
    ... Level is missing from the output - It only contains InfoString. ... No newline character at the end. ... Any advice on what it going on and how to get this resolved? ... Mattias Sjögren mattias @ mvps.org ...
    (microsoft.public.dotnet.general)
  • Re: [C]
    ... complaining about malloc() ... pls advice. ... >> pointer to a string containing the result as an argument of the ... > Your last output should end with a newline character. ...
    (alt.comp.lang.learn.c-cpp)
  • RE: putting $1 into a var
    ... >> deadline to meet that is now met. ... >> It was a missing ~ and me failing to use s on the end of my pattern ... >newline character issue. ...
    (perl.beginners)
  • fscanf or fgets still misses last line unless there is a newline
    ... upon scanning in a file line by line to avoid ... missing the last line if there is not a newline character (aka you ...
    (comp.lang.c)
  • Re: How to ignore line-initial hyphen plus space (tricky)
    ... > I'm betting \makeatletter is missing. ... Now the file compiles without any errors, ...
    (comp.text.tex)

Loading