Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 486 Bytes

MA0083.md

File metadata and controls

21 lines (17 loc) · 486 Bytes

MA0083 - ConstructorArgument parameters should exist in constructors

using System.Windows.Markup;

namespace Sample
{
    public class MyMarkupExtension : MarkupExtension
    {
        public MyMarkupExtension() { }

        public MyMarkupExtension(object value1)
        {
            Value1 = value1;
        }

        [ConstructorArgument("value2")] // non-compliant, "value2" is not a parameter of the constructor
        public object Value1 { get; set; }
    }
}