Wrox Programmer Forums
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 3rd, 2004, 02:15 PM
Authorized User
 
Join Date: Nov 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Tabs

Is there an easy way to add a tab space in C# code? I want to do something like this:

string x = myString + (Tab Space) + myString2;

 
Old December 3rd, 2004, 02:42 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Try \t embedded in the string:

myString + "\t" + myString2;

Alternatively, you can import ControlChars and use ControlChars.Tab.

I think it's located in the VisualBasic namespace, so \t is probably cleaner....


Cheers,

Imar





Similar Threads
Thread Thread Starter Forum Replies Last Post
Worksheets (tabs) paul20091968 Excel VBA 1 December 12th, 2006 04:33 AM
Tabs Formatting balesh ASP.NET 1.0 and 1.1 Professional 0 June 5th, 2006 11:18 PM
Tabs in a string? Ric_H ADO.NET 1 April 24th, 2006 09:03 PM
document tabs Zodd Dreamweaver (all versions) 3 May 9th, 2005 02:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.