We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
namespace MacroLibrary1 { [MacroUsage(MacroPhase.WithTypedMembers, MacroTargets.Class)] public macro Macro1(tb : TypeBuilder) { M.Do(tb) } module M { public Do(tb : TypeBuilder) : PExpr { Message.Hint("Properties"); foreach (v in tb.GetProperties()) Message.Hint($"$v"); Message.Hint("Instance properties"); foreach (v in tb.GetProperties(BindingFlags.Instance)) Message.Hint($"$v"); Message.Hint("Static properties"); foreach (v in tb.GetProperties(BindingFlags.Static)) Message.Hint($"$v"); <[ ]> } } }
[Macro1] class Program { P : int { get { 0 } } static SP : int { get { 0 } } static Main() : void { } }
Output
hint: Properties hint: property: Program.SP : int { get; } hint: property: Program.P : int { get; } hint: Instance properties hint: Static properties
No instance and static properties !
Workaround: specify "BindingFlags.Public | BindingFlags.NonPublic"
The text was updated successfully, but these errors were encountered:
I think, you should add BindingFlags.Public or/and BindingFlags.NonPublic value.
Sorry, something went wrong.
Yes this helped. But I think this should be implicit if you do not specify none of them.
No branches or pull requests
Output
No instance and static properties !
Workaround: specify "BindingFlags.Public | BindingFlags.NonPublic"
The text was updated successfully, but these errors were encountered: