ParameterInfo[] pif = m.GetParameters(); foreach (ParameterInfo p in pif) { string ParamType = p.ParameterType.ToString(); string ConvPType = ConvertToShortForm(ParamType); if (p.IsOut) { ConvPType = ConvPType.Replace("ref", "out"); } strMethodName += ConvPType; strMethodName += " "; strMethodName += p.Name; if (p.IsOptional) { var optional_value = p.DefaultValue; switch (optional_value) { case "": strMethodName += @"""" + @""""; break; case null: strMethodName = strMethodName + "=" + "null"; break; case "False": strMethodName += " = " + p.DefaultValue.ToString().ToLower(); break; default: strMethodName += ", "; break; }
//if (p.DefaultValue != null) // strMethodName += " = " + p.DefaultValue.ToString().ToLower(); //if (p.DefaultValue == null) // strMethodName = strMethodName + "=" + "null"; //if (strMethodName.EndsWith("= ")) // strMethodName += @"""" + @"""";
case false
case "False".
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)