| | |
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 asp barchart bitmap box broadcast buttons c# check checkbox client column combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development display draganddrop drawing encryption enum equation event excel file form format formbox forms formupdate function gdi+ httpwebrequest image index input install java label linux list listbox mandelbrot math mouseclick mysql networking operator packaging parse path photoshop picturebox pixelinversion post powerpacks programming radians regex remote remoting reporting richtextbox robot server sleep socket sql statistics stream string table text textbox thread time timer transform treeview update usercontrol validation visualstudio webbrowser wfa windows winforms wpf xml





