diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs
index b95655ba5..119185bc5 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs
@@ -1735,7 +1735,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
{
decl.Name = parameter.Name;
}
- if (parameter.GetDefaultValueAssignmentAllowed() && this.ShowConstantValues)
+ if (parameter.IsDefaultValueAssignmentAllowed() && this.ShowConstantValues)
{
try
{
diff --git a/ICSharpCode.Decompiler/TypeSystem/IParameter.cs b/ICSharpCode.Decompiler/TypeSystem/IParameter.cs
index 923ec06e3..530f2406a 100644
--- a/ICSharpCode.Decompiler/TypeSystem/IParameter.cs
+++ b/ICSharpCode.Decompiler/TypeSystem/IParameter.cs
@@ -108,7 +108,17 @@ namespace ICSharpCode.Decompiler.TypeSystem
internal static class IParameterExtensions
{
- public static bool GetDefaultValueAssignmentAllowed(this IParameter parameter)
+ ///
+ /// Checks if the parameter is allowed to be assigned a default value.
+ ///
+ ///
+ /// This checks , , ,
+ /// and on this parameter and all subsequent parameters.
+ /// If the parameter has no , it does not check subsequent parameters.
+ ///
+ /// The parameter
+ /// True if the has a default value and is allowed to be assigned a default value.
+ public static bool IsDefaultValueAssignmentAllowed(this IParameter parameter)
{
if (!DefaultValueAssignmentAllowedIndividual(parameter))
return false;
diff --git a/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataParameter.cs b/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataParameter.cs
index 3067f135e..8089b1eae 100644
--- a/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataParameter.cs
+++ b/ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataParameter.cs
@@ -63,7 +63,7 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation
var metadata = module.metadata;
var parameter = metadata.GetParameter(handle);
- bool defaultValueAssignmentAllowed = this.GetDefaultValueAssignmentAllowed();
+ bool defaultValueAssignmentAllowed = this.IsDefaultValueAssignmentAllowed();
if (IsOptional && !defaultValueAssignmentAllowed)
{