﻿<?xml version="1.0" encoding="utf-8"?>
<ErrorDocumentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ErrorName>CS0657</ErrorName>
  <Examples>
    <string>// cs0657.cs : 'param' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'field'
// Line : 6

struct S
{
    [param: Obsolete]
    int field;
}</string>
    <string>// cs0657.cs : 'param' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'method, return'
// Line: 14

using System;

[AttributeUsage(AttributeTargets.All)]
public class TestAttribute: Attribute
{
}

class C
{
    int Prop {
        [param:Test]
        get {
            return 1;
        }
    }
}</string>
    <string>// cs0657.cs : 'type' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'method, param, return'
// Line: 14

using System;

[AttributeUsage(AttributeTargets.All)]
public class TestAttribute: Attribute
{
}

class C
{
    int Prop {
        [type:Test]
        set {
        }
    }
}</string>
    <string>// cs0657.cs : 'type' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'property'
// Line: 13

using System;

[AttributeUsage(AttributeTargets.All)]
public class TestAttribute: Attribute
{
}

class C
{
    [type:Test]
    int Prop {
        set {
        }
    }
}</string>
    <string>// cs0657.cs : 'param' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'event, field, method'
// Line : 8

using System;

struct S
{
    [param: Obsolete]
    event ResolveEventHandler field;
}</string>
    <string>// cs0657.cs : 'param' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'event, property'
// Line : 8

using System;

class C
{
    [param: Obsolete]
    event ResolveEventHandler field { 
        add {}
        remove {}
    }
}</string>
    <string>// cs0657.cs : 'event' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'method, param, return'
// Line: 14

using System;

[AttributeUsage(AttributeTargets.All)]
public class TestAttribute: Attribute
{
}

class C
{
    event ResolveEventHandler field { 
        [event: Test]
        add {}
        remove {}
            
    }
}</string>
    <string>// cs0657.cs : 'method' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'assembly, module'
// Line : 4

[method: System.CLSCompliant (false)]
</string>
    <string>// cs0657.cs : 'assembly' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'type'
// Line : 9

using System;

[assembly: CLSCompliant (false)]
public class C {}
    
[assembly: CLSCompliant (false)]
public class D {}
</string>
    <string>// cs0657.cs : 'field' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'event, method'
// Line : 7

using System;

interface X {
  [field:NonSerialized]
  event EventHandler XEvent;
}
</string>
    <string>// cs0657.cs : 'return' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'assembly, module'
// Line : 7

using System;

[return: CLSCompliant (false)]


public enum E {}
</string>
    <string>// cs0657.cs : 'return' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'assembly, module'
// Line : 7

using System;

[method: CLSCompliant (false)]


public class C
{
}
</string>
    <string>// cs0657.cs : 'param' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'assembly, module'
// Line : 6

using System;

[param: CLSCompliant (false)]
public enum E
{
    item
}
</string>
    <string>// cs0657.cs : 'assembly' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'field'
// Line : 7

using System;

public enum E
{
    [assembly: CLSCompliant (false)]
    item
}
</string>
    <string>// cs0657.cs : 'method' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'type'
// Line : 4

[method: Obsolete]
public interface I
{
}
</string>
    <string>// cs0657.cs : 'method' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'type, return'
// Line : 4

[method: Obsolete]
delegate void Delegate ();
</string>
    <string>// cs0657.cs : 'param' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'method, return'
// Line : 4

struct S
{

    [param: Obsolete]
    void method () {}
}</string>
    <string>// cs0657.cs : 'type' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'param'
// Line : 13

using System;

[AttributeUsage(AttributeTargets.All)]
public class TestAttribute: Attribute
{
}

struct S
{
    void method (
        [type: Test]
        int p) {}
}</string>
    <string>// cs0657.cs : 'assembly' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'type'
// Line : 7

using System.Reflection;

namespace N {
    [assembly: AssemblyKeyName("")]
    class A {}
}

</string>
  </Examples>
</ErrorDocumentation>