Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

  • *Experts*
Posted

I'd 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

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

Still Can't 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...