Test2

Test2.cs
01using System; 02using System.Collections.Generic; 03using System.Text; 04 05namespace Db4objects.Db4odoc.selectivepersistence 06{ 07 class Test2 08 { 09 private Test1 test1; 10 private string name; 11 private NotStorable transientClass; 12 13 14 public Test2(string name, NotStorable transientClass, Test1 test1) 15 { 16 this.test1 = test1; 17 this.name = name; 18 this.transientClass = transientClass; 19 } 20 21 public override string ToString() 22 { 23 if (transientClass == null) 24 { 25 return string.Format("{0}/{1}; test1: {2}", name, "null", test1); 26 } 27 else 28 { 29 return string.Format("{0}/{1}; test1: {2}", name, transientClass, test1); 30 } 31 } 32 } 33}

Test2.vb
01Imports System 02Imports System.Collections.Generic 03Imports System.Text 04Namespace Db4objects.Db4odoc.SelectivePersistence 05 06 Class Test2 07 Private test1 As Test1 08 Private name As String 09 Private transientClass As NotStorable 10 11 Public Sub New(ByVal name As String, ByVal transientClass As NotStorable, ByVal test1 As Test1) 12 Me.test1 = test1 13 Me.name = name 14 Me.transientClass = transientClass 15 End Sub 16 17 Public Overloads Overrides Function ToString() As String 18 If transientClass Is Nothing Then 19 Return String.Format("{0}/{1}; test1: {2}", name, "Nothing", test1.ToString()) 20 Else 21 Return String.Format("{0}/{1}; test1: {2}", name, transientClass.ToString(), test1.ToString()) 22 End If 23 End Function 24 End Class 25End Namespace