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

Clarify Event Raising in Structures and Add Code Example for Triggering Events #44556

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

shethaadit
Copy link
Contributor

@shethaadit shethaadit commented Jan 28, 2025

Summary

This update resolves confusion regarding event raising in structures by addressing the statement:
"Similarly, you can raise the salaryReviewTime event from outside the structure."

Key changes:

  • Explained that events cannot be raised directly from outside the structure.
  • Introduced a public method TriggerSalaryReview within the structure to raise the salaryReviewTime event.
  • Added a code example demonstrating how to trigger the event through this method.

These changes ensure accurate guidance, improve clarity, and enhance developer understanding of event handling in Visual Basic structures.

Fixes #36231


Internal previews

📄 File 🔗 Preview link
docs/visual-basic/programming-guide/language-features/data-types/how-to-declare-a-structure.md How to: Declare a Structure (Visual Basic)

@dotnetrepoman dotnetrepoman bot added this to the January 2025 milestone Jan 28, 2025
@dotnet-policy-service dotnet-policy-service bot added dotnet-visualbasic/svc community-contribution Indicates PR is created by someone from the .NET community. labels Jan 28, 2025
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM @shethaadit

I'll :shipit: now.

@BillWagner BillWagner enabled auto-merge (squash) January 28, 2025 14:14
@BillWagner BillWagner merged commit dfa0dfb into dotnet:main Jan 28, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution Indicates PR is created by someone from the .NET community. dotnet-visualbasic/svc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confusing description or missing code example for raising a structure event from outside
2 participants