If you happened to be programming in VB.NET and happened to receive an IEnumerable of anonymous objects and if you then need to return the IEnumerable with every element slightly modified, it's a pain.
You have to create a new anonymous object and manually type every property of the old object
in every step of the loop.
In order to automatise this process, this function comes very handy:
Pass it the anonymous object and a list of key value pairs (these would be the properties to be added) and it returns another object
retaining all the old properties and adding the new ones.
Note that the implementation uses the Expando object.
Tuesday, February 14, 2017
One of the most basic tasks when automating anything in CATIA, it's usually to walk the whole tree and apply some changes to objects in ...
Bitcoin Bloom filters are like mazes with many entries and two ways out, lets call them "no way" and "my way". One decid...
If you happened to be programming in VB.NET and happened to receive an IEnumerable of anonymous objects and if you then need to return the ...
Today I wanted to update a row on an Oracle database table. The PL/SQL query was not difficult at all, however, there was a peculiarity. Som...