| | |
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 algorithm array barchart bitmap box broadcast c# check checkbox client combobox control conversion csharp custom customactiondata database datagrid datagridview dataset datastructure date/time datetime datetimepicker degrees development dll draganddrop drawing encryption enum event excel file filename files form format forms function gdi+ gis gtk hash httpwebrequest image index input install java label list listbox mandelbrot math mouseclick mysql operator outlook2003 path photoshop picturebox pixelinversion pixelminversion post programming radians regex remoting richtextbox server sleep snooze socket sql statistics stream string table tables tcp text textbox thread time timer update usercontrol usercontrols validation visualstudio webbrowser webcam wia windows winforms wpf xml





