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 134259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:34:52+00:00 2026-05-11T06:34:52+00:00

Is there any kind of naming convention for C# WinForms code? I Googled this

  • 0

Is there any kind of naming convention for C# WinForms code? I Googled this a bit and got nowhere fast.

I’m designing a WinForms app and the Class View is becoming tough to navigate fast, so I need to apply some standards to find things faster.

  1. New (typical) control When you drag a new control onto a form in VS, it assigns it a camel cased name, but generates a private member field. I thought the convention for private class members was camel case prefixed with an underscore?

  2. What about events & methods for controls placed on a form? Is the Studio default of ControlName_MethodName the way to go for eveything?

  • 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. 2026-05-11T06:34:53+00:00Added an answer on May 11, 2026 at 6:34 am

    No, the convention in .NET is typically to not use underscores at all. There are exceptions like in the event handlers but for most things usually there are no underscores. Other than event handlers, I do not use underscores. I use camel casing for private members and functions and pascal casing for public members (properties) and functions. However, other people have different standards. Some people like to use the C++ convention of doing _someVariable or m_someVariable. I don’t do this though.

    I rarely use hungarian, but I do use hungarian for GUI controls (So a submit button might be btnSubmit, or a list box of customers would be lstCustomers).

    As far as event handlers, you know, this is a bit of a gray area for me. If I use the Visual Studio ‘tab-complete’ way of creating event handlers, I will typically leave the name as is. This, of course, introduces the underscores. However, if I don’t, and it is not a GUI component, sometimes I just use the camelCasing. Probably for event handlers, it would be a good practice use the VS default naming scheme. I think it’s fine as long as you stay relatively consistent.

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

Sidebar

Related Questions

I just began working on a little twitter-app using tweepy. is there any kind
Note: There was not any question with this kind of problem here or anywhere...
Just wondering if there are any kind of guidelines for when you are designing
Is there any kind of Java math function like what this math equation does?
is there any kind of semaphore for processes in Windows API? I found this
Is there any kind of library for PHP which can decode tinyurl, Goo.gl, bit.ly
I have this kind of code in some applications (from microsoft) [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage( Microsoft.Naming,
Is there any kind of difference between the following two lines of code in
I got 2 questions. 1) I was wondering if there is any kind of
Is there any standard naming convention for VB.NET ? Based your programming experiences, would

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.