Line Break in J#

haroldjclements

Well-known member
Joined
Jun 13, 2004
Messages
46
Hello All,

Just a quick question. I have written a little app that lists the users in a database and the results are displayed in a ‘label’ on a form. My problem is that I can not create a line break, therefore I get results like this:

Harold Clements Dave Brown Iain
Smith Lee Cooper

Where I want:

Harold Clements
Dave Brown
Iain Smith
Lee Cooper

In traditional Java you have the ‘\n’ but in J# that creates a compiling error.

Any suggestions will be gratefully received,
Harold Clements
 
Id use Environment.NewLine first. If you need or want the \n I would assume the backslash needs to be doubled up:
"name\\nname2" becomes:
name
name2

-ner
 
Still Cant Get It!

Cheers for your reply guys

The ‘\\n’ doses not work.

The Environment.NewLine is not in J#, in its places (I think) is System.Environment.getNewLine’. However I get the compilation error “Cannot resolve name’

Any ideas what I am doing wrong?

Thanks for you help,
Harold
 
Got it!

Its me being a prat!

System.Environment.get_NewLine();

Forgot the () on the end.

Cheers for your help eveyone.
Harold.
 
Back
Top