Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6324013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:37:42+00:00 2026-05-24T16:37:42+00:00

am writing a class that has the same name for events and method, but

  • 0

am writing a class that has the same name for events and method, but visual studion won’t allow me

The event

public event Close()

the method

Public Sub Close()

End Sub

how can i do this, i don’t want to use different names

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T16:37:43+00:00Added an answer on May 24, 2026 at 4:37 pm

    The Microsoft Framework Design Guidelines specifies something along the lines of the following as best practice (these are from our internal document but derived from the former mentioned guidelines to which I will find a link):

    • Do name events with a verb or a verb phrase.
    • Do give event names a concept of before and after, using the present and past tense
      (gerunds.)

      • For example, a close event that is raised before a window is closed would be called > Closing and one that is raised after the window is closed would be called Closed.
    • Do not use Before or After prefixes or suffixes to indicate pre and post events.
    • Do name event handlers (delegates used as types of events) with the EventHandler suffix.
    • Do use two parameters named sender and e in event handler signatures.
      • The sender parameter should be of type Object, and the e parameter should be an instance of or inherit from EventArgs.
    • Do name event argument classes with the EventArgs suffix.
    • Do name event handler method with On.
      • For example, a method that handles a Closing event should be named OnClosing.

    Update: Relevant Microsoft Design Guidelines Link.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a JavaSCript class that has a method that recursively calls itself. Scheduler.prototype.updateTimer
I'm writing an application which has two classes that provide basically the same functionality
I'm writing an Objective-C++ class interface that has to be usable from both Objective-C
I'm currently writing a class that implements the SeekableIterator interface and have run into
I'm busy writing a class that monitors the status of RAS connections. I need
I am writing a class that is linked to an external resource. One of
I am writing a class that I know that needs a lock, because the
I'm writing a class that returns both a DataTable and a IEnumerable. I cannot
I'm writing a class that extends a UIScrollView to display a large tiled image,
I am writing a class that inherits from IHttpHandler for script and css combining.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.