Click here to Skip to main content
15,886,799 members

Comments by Henning Dieterichs (Top 38 by date)

Henning Dieterichs 7-Feb-14 13:39pm View    
Reason for my vote of 3 \n In an article about cloning objects, you should at least mention the ICloneable interface. Besides, your CloneFrom method should be virtual, so that CloneFrom behaves still as expected in derived classes. Even more, the method should not clone from another object, but create and return a clone of its own (simply "Clone" instead of "CloneFrom"). This way your clone method behaves polymorphic: The caller does not have to know the concrete type of the object to clone.
So
var a1 = new A(); var a2 = new A(); a2.CloneFrom(a1);
will become
var a1 = new A(); var a2 = a1.Clone();
Henning Dieterichs 2-Nov-12 5:25am View    
Does nobody has any hints / ideas? Or do I have to write my custom xml-editor?
Henning Dieterichs 26-Jun-12 11:58am View    
Now it is published:
http://www.codeproject.com/Articles/404573/Units-of-Measure-Library-for-NET
Henning Dieterichs 26-Jun-12 11:46am View    
Maybe indeed, the point is not clear enough:

I want to get this:
H:\Informatik\C#\SharedAssemblies\HDUnitsOfMeasure\HDUnitsOfMeasureValidator\bin\Debug\HDUnitsOfMeasureValidator.dll

from this:
<ProjectReference Include="..\HDUnitsOfMeasureValidator\HDUnitsOfMeasureValidator.csproj">
<Project>{50D3B367-102B-45E9-8917-C7F7D0BC6565}</Project>
<name>HDUnitsOfMeasureValidator
</ProjectReference>
Henning Dieterichs 14-Jun-12 18:22pm View    
Thank you for your response!
I want to resolve the "project-reference" into an assembly:
Through the "ProjectReferences" property of my task, I get only an array of ITaskItem.
But how can I get the file path to the assembly (i.e. the compiled project in the same solution) from this ITaskItem object?
There is no property like HintPath, in contrast to the normal "References" ITaskItem.