* CodeParameterDeclarationExpressionCollection.cs: Use CollectionBase
[mono.git] / mcs / class / System / System.CodeDom / CodeMethodInvokeExpression.cs
index af298ace00ececce2dc8bcefd08754cf10c93fb8..f1c85eb498890b7f986f3e298c1b86499be35110 100644 (file)
@@ -46,7 +46,6 @@ namespace System.CodeDom
                //
                public CodeMethodInvokeExpression () 
                {
-                       method = new CodeMethodReferenceExpression (null, String.Empty);
                }
 
                public CodeMethodInvokeExpression (CodeMethodReferenceExpression method, params CodeExpression[] parameters)
@@ -68,6 +67,9 @@ namespace System.CodeDom
                //
                public CodeMethodReferenceExpression Method {
                        get {
+                               if (method == null) {
+                                       method = new CodeMethodReferenceExpression ();
+                               }
                                return method;
                        }
                        set {