| | |
setw() function in C#?
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
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?
C# Syntax (Toggle Plain Text)
int[] x = y = z = new int[10]; // or I THINK this works too int[] x, y, z = new int[10];
![]() |
Similar Threads
- C++ File I/O (C++)
- question re: c++ program (C++)
- how to call this function...using menu..! (C++)
- Lining up number at the decimal. (C)
- Function[Array] in combination with cin>> (C++)
Other Threads in the C# Forum
- Previous Thread: Download image from DB and view it...
- Next Thread: Windows form programming tutorials?
| Thread Tools | Search this Thread |
.net access ado.net algorithm array barchart bitmap box broadcast buttons c# check checkbox client color combobox connection console control conversion csharp custom database datagrid datagridview dataset datetime degrees developer development draganddrop drawing encryption enum event excel file files form format forms function gdi+ hospitalmanagementinformationsystem httpwebrequest image index input install java label list listbox listener mandelbrot math mouseclick mysql operator path photoshop picturebox pixelinversion post priviallages. programming radians regex region remote remoting richtextbox serialization server sleep socket sql statistics stream string table tcp temperature text textbox thread time timer txt update uploadatextfile usercontrol validation visualstudio webbrowser windows windowsformsapplication winforms wpf xml





