Example #1
0
        // Get the parameters for this constructor.
        public override ParameterInfo[] GetParameters()
        {
            if (parameters != null)
            {
                return(parameters);
            }
            int numParams = ClrHelpers.GetNumParameters(privateData);
            int param;

            parameters = new ParameterInfo [numParams];
            for (param = 0; param < numParams; ++param)
            {
                parameters[param] =
                    ClrHelpers.GetParameterInfo(this, this, param + 1);
            }
            return(parameters);
        }
Example #2
0
        // Convert the constructor name into a string.
        public override String ToString()
        {
            StringBuilder builder   = new StringBuilder();
            int           numParams = ClrHelpers.GetNumParameters(privateData);
            int           param;
            ParameterInfo paramInfo;

            builder.Append("Void ");
            builder.Append(Name);
            builder.Append('(');
            for (param = 0; param < numParams; ++param)
            {
                if (param > 0)
                {
                    builder.Append(", ");
                }
                paramInfo = ClrHelpers.GetParameterInfo
                                (this, this, param + 1);
                builder.Append(paramInfo.ParameterType.Name);
            }
            builder.Append(')');
            return(builder.ToString());
        }