Index: trunk/bin/SubOperation/templates/delegate_class.tab
===================================================================
--- trunk/bin/SubOperation/templates/delegate_class.tab	(revision 338)
+++ trunk/bin/SubOperation/templates/delegate_class.tab	(revision 340)
@@ -1,17 +1,38 @@
-Class Delegate #name#
-	Inherits System.DelegateBase
+#namespace_begin#
+	Class Delegate #name#
+		Inherits System.DelegateBase
 
-Public
-	Sub Callback()
-	End Sub
-	Sub Callback( sd As System._SimpleDelegate )
-		Add( sd )
-	End Sub
-	Sub Call(#params#)
-		Dim i As Long
-		For i = 0 To ELM(simpleDelegates.Count)
-			Dim sd = simpleDelegates[i]
-			__call sd.methodPtr, sd.object, #params#
-		Next
-	End Sub
-End Class
+	Public
+		Sub #name#()
+		End Sub
+		Sub #name#( dg As #name# )
+			Add( dg )
+		End Sub
+
+		#call_method_begin#
+		'Sub Call(...)
+			Dim i As Long
+			For i = 0 To ELM(simpleDelegates.Count)
+				Dim sd = simpleDelegates[i]
+				#result# __delegate_dynamicmethod_call(sd.methodPtr, sd.object, #params#)
+			Next
+		'End Sub
+		#call_method_end#
+
+		Sub Add( dg As #name# )
+			_Add( dg )
+		End Sub
+
+		Function Operator+ ( dg As #name# ) As #name#
+			Dim result = New #name#( This )
+			result._Add( dg )
+			Return result
+		End Function
+
+		Static Function _CreateDelegate( object As Object, methodPtr As VoidPtr ) As #name#
+			Dim dg = New #name#
+			dg.simpleDelegates.Add( New System._SimpleDelegate( object, methodPtr ) )
+			Return dg
+		End Function
+	End Class
+#namespace_end#
