an.c.
✅ Mono.Cecil.ParameterDefinition.HasDefault
in mono.cecil in a ParameterDefinition, what does HasDefault mean? I was hoping for it to be that if a method signature looks like MyMethod(bool x = false) x was left to its default or not. That isn't the case.
I'm asking this because I need to know if a param of a MethodSpecification, say MyMethod, has a param assigned or left to its default. Is it even possible?
9 replies
Suppress CS0618 for entire file [Answered]
Can I suppress CS0618 for an entire file? I tried with
[System.Diagnostics.CodeAnalysis.SuppressMessage("Warning", "CS0618: Type or member is obsolete", Justification = "Some reason")]
but it doesn't look correct. How can I achieve this?
I want to avoid to #pragma warning disable CS0618 // Type or member is obsolete
on each single occurrence. And I want to avoid a global setting.27 replies