|
It may be compact and correct, but I don't like it much as it is an expensive, quadratic, operation: it will look for each element in the list of indices.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
As I stated, it will work, whether it is efficient is a completely different story. I prefer your method to be honest, but I also like to keep my hand in with these new fangled things MS keeps bringing in. Some of them are actually plenty useful, sometimes, but like all these abstractions that are creeping into our job, supposedly to make our lives easier, you have to weigh up the various options.
...and I have extensive experience writing computer code, including OIC, BTW, BRB, IMHO, LMAO, ROFL, TTYL.....
|
|
|
|
|
thanks for the hint, would you be able to solve assignement in one statement?
there is array of ints and array of objects with public int MyValue property.
the number of elements in both arrays are equal.
How to assign those all ints to every object MyValue in one pass?
for (int i = 0; i < ints.Length; i++)
objects[i].MyValue = ints[i];
Чесноков
|
|
|
|
|
Why on earth are you trying to solve this in one statement? The more you try to achieve that, the harder it's going to be for you to remember what your code actually does and how it works.
|
|
|
|
|
just to practice LINQ queries
Чесноков
|
|
|
|
|
While I agree with Pete, here is how you would do that:
ints.Select((intValue, intIndex) => intIndex).ToList().ForEach((index) => objects[index].MyValue = ints[index]);
|
|
|
|
|
List<int> selected = (from i in indices select ints[i]).ToList();
|
|
|
|
|
|
Hello, I want to create a table in c# to display result.
I create a DateTable and I entered the information in it, but now I can´t display the information in my form.
I am creating a Window Application
How can I solve it??
If Someone have any example, can give me??
Thanks
|
|
|
|
|
You need to bind it to some form of output, such as a DataGrid . Suppose you have dragged a DataGrid onto your form and called it dgResult , you need to bind the DataTable to it using the following:
dgResult.DataSource = myDataTable;
|
|
|
|
|
A DataGridView is often used to display the content of a DataTable; and data binding may make it very easy to do. There are examples everywhere, the one I have on-line is rather complex, it's in my CP Vanity article. I suggest you google DataGridView DataTable.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Yes I use a DataGridView an I use this sentences.
datagridview_table.DataSource = dttable;
datagridview_table.show();
But it doesn´t show me nothing.
Thanks
|
|
|
|
|
MiguelSanchezCuarental wrote: datagridview_table.show();
???
I've never used Show() on anything but a Form.
If you add the DGV to the Form, it gets shown automatically. Either use Visual Designer, or issue the statement this.Controls.Add(myDGV);
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
I can solve this.
Thank you very much.
|
|
|
|
|
Hi,
i'm mahesh
how to dynamically convert panel value into imageurl value using c sharp web page???
|
|
|
|
|
Would you like to try rephrasing that?
Use English this time, please...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
Isn't Hinglish(Hindi +English) good enough?
|
|
|
|
|
Not when it uses the English words in (I assume) Hindi syntax and grammar.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
Not when you can't understand what the poster is asking.
|
|
|
|
|
You need to dynamic url by getting web page value after refresh panel image
using c sharp
|
|
|
|
|
|
Upgrade?[^]
Typical n-tiered architecture:
DB <-> Junk(0) <-> ... <-> Junk(n-1) <-> Pretty
|
|
|
|
|
Clean the print head.
The best things in life are not things.
|
|
|
|
|
When i send from word or excel its seems perfect.i think its not a problem about my printer.
|
|
|
|
|
How did you send the data? Post a relevant code fragement.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|