Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute target is not checked #154

Open
NN--- opened this issue Oct 24, 2011 · 0 comments
Open

Attribute target is not checked #154

NN--- opened this issue Oct 24, 2011 · 0 comments

Comments

@NN---
Copy link
Member

NN--- commented Oct 24, 2011

using System;

[AttributeUsage(AttributeTargets.Constructor)]
class MyConstructorAttribute : Attribute { }

class A
{
  [method: MyConstructor]
  public F() : void { }
}

This code compiles but is incorrect.
Documentation: http://msdn.microsoft.com/en-us/library/b3787ac0(v=VS.90).aspx
http://msdn.microsoft.com/en-us/library/system.attributetargets.aspx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant