Click here to Skip to main content
15,891,375 members
Articles / Programming Languages / C#

Deep copy of objects in C#

Rate me:
Please Sign up or sign in to vote.
4.83/5 (15 votes)
18 Jul 2009CPOL 153.9K   1.2K   34  
How to do a deep copy of objects using System.Reflection.
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!--This file represents the results of running a test suite-->
<test-results name="C:\Documents and Settings\D01\Moje dokumenty\Visual Studio 2008\Projects\HCloner\HClonerTest\bin\Debug\HClonerTest.dll" total="18" errors="0" failures="0" not-run="0" ignored="0" skipped="0" invalid="0" date="2009-07-18" time="22:02:46">
  <environment nunit-version="2.5.0.9122" clr-version="2.0.50727.3053" os-version="Microsoft Windows NT 5.1.2600 Dodatek Service Pack 3" platform="Win32NT" cwd="C:\Documents and Settings\D01\Moje dokumenty\Visual Studio 2008\Projects\HCloner\HClonerTest\bin\Debug" machine-name="DETO" user="D01" user-domain="DETO" />
  <culture-info current-culture="pl-PL" current-uiculture="pl-PL" />
  <test-suite name="C:\Documents and Settings\D01\Moje dokumenty\Visual Studio 2008\Projects\HCloner\HClonerTest\bin\Debug\HClonerTest.dll" executed="True" success="True" time="0.188" asserts="0">
    <results>
      <test-suite name="HAKGERSoft" executed="True" success="True" time="0.188" asserts="0">
        <results>
          <test-suite name="AutoTest" executed="True" success="True" time="0.063" asserts="0">
            <results>
              <test-case name="HAKGERSoft.AutoTest.ProcessCLSObjects" executed="True" success="True" time="0.016" asserts="0" />
              <test-case name="HAKGERSoft.AutoTest.ProcessTestObjects" executed="True" success="True" time="0.000" asserts="0" />
            </results>
          </test-suite>
          <test-suite name="DifferSanityCheck" executed="True" success="True" time="0.047" asserts="0">
            <results>
              <test-case name="HAKGERSoft.DifferSanityCheck.ProcessFailSameRef" executed="True" success="True" time="0.016" asserts="0" />
              <test-case name="HAKGERSoft.DifferSanityCheck.ProcessFailStringDiff" executed="True" success="True" time="0.016" asserts="0" />
              <test-case name="HAKGERSoft.DifferSanityCheck.ProcessFailValueTypeDiff" executed="True" success="True" time="0.016" asserts="0" />
              <test-case name="HAKGERSoft.DifferSanityCheck.ProcessSucc" executed="True" success="True" time="0.000" asserts="0" />
            </results>
          </test-suite>
          <test-suite name="ManualTest" executed="True" success="True" time="0.078" asserts="0">
            <results>
              <test-case name="HAKGERSoft.ManualTest.ArrayEmpty" executed="True" success="True" time="0.016" asserts="2" />
              <test-case name="HAKGERSoft.ManualTest.ArrayRefTyped" executed="True" success="True" time="0.000" asserts="5" />
              <test-case name="HAKGERSoft.ManualTest.ArrayValueTyped" executed="True" success="True" time="0.000" asserts="5" />
              <test-case name="HAKGERSoft.ManualTest.AutomaticProperyValueTyped" executed="True" success="True" time="0.000" asserts="9" />
              <test-case name="HAKGERSoft.ManualTest.ListEmpty" executed="True" success="True" time="0.000" asserts="2" />
              <test-case name="HAKGERSoft.ManualTest.ListRefTyped" executed="True" success="True" time="0.000" asserts="5" />
              <test-case name="HAKGERSoft.ManualTest.ListValueTyped" executed="True" success="True" time="0.000" asserts="5" />
              <test-case name="HAKGERSoft.ManualTest.ManualSimpleObject" executed="True" success="True" time="0.000" asserts="5" />
              <test-case name="HAKGERSoft.ManualTest.Nullable" executed="True" success="True" time="0.000" asserts="1" />
              <test-case name="HAKGERSoft.ManualTest.NullFail" executed="True" success="True" time="0.016" asserts="0" />
              <test-case name="HAKGERSoft.ManualTest.String" executed="True" success="True" time="0.016" asserts="2" />
              <test-case name="HAKGERSoft.ManualTest.ValueType" executed="True" success="True" time="0.000" asserts="6" />
            </results>
          </test-suite>
        </results>
      </test-suite>
    </results>
  </test-suite>
</test-results>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Poland Poland
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions