Please support our C# advertiser: Programming Forums
Views: 7538 | Replies: 4
![]() |
Hi, I'd like to have tabs in my console app, but instead of using \t, I'd like to use an equivalent of the C++ setw() method in C#. Any ideas of what I might use?
And another thing, in C++, you would declare more than one array with indexes like this:
int x[10], y[10], z[10];
Is there a shorter way than writing like this in C# :
int[] x = new int[10];
int[] y = new int[10];
int[] z = new int[10];
Thanx for the help, if someone knows.
Edit: Oh, damnit, wrong forum! Can a mod move it to the C# forum?
And another thing, in C++, you would declare more than one array with indexes like this:
int x[10], y[10], z[10];
Is there a shorter way than writing like this in C# :
int[] x = new int[10];
int[] y = new int[10];
int[] z = new int[10];
Thanx for the help, if someone knows.
Edit: Oh, damnit, wrong forum! Can a mod move it to the C# forum?
•
•
Join Date: Jun 2005
Location: The Woodlands, TX during the week, Bryan/College Station on the weekends.
Posts: 21
Reputation:
Rep Power: 4
Solved Threads: 0
•
•
Join Date: Jul 2003
Location: Bamberg, Germany
Posts: 117
Reputation:
Rep Power: 6
Solved Threads: 2
int[] x = y = z = new int[10]; // or I THINK this works too int[] x, y, z = new int[10];
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode