haroldjclements Posted July 14, 2004 Posted July 14, 2004 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 Quote
wessamzeidan Posted July 14, 2004 Posted July 14, 2004 I use 'Environment.NewLine' in VB.NET, I'm not sure if it works for J# Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
*Experts* Nerseus Posted July 14, 2004 *Experts* Posted July 14, 2004 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 Quote "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
haroldjclements Posted July 15, 2004 Author Posted July 15, 2004 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 Quote
haroldjclements Posted July 15, 2004 Author Posted July 15, 2004 Got it! It's me being a prat! System.Environment.get_NewLine(); Forgot the () on the end. Cheers for your help eveyone. Harold. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.