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

  • Home
  • SEARCH
  • 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 6149661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:29:25+00:00 2026-05-23T19:29:25+00:00

Ok hopefully this does not get deleted because I really am interested in some

  • 0

Ok hopefully this does not get deleted because I really am interested in some input on my question but I realize it is a bit subjective. I really like in C# when defining a varaible of a type I can use the same name but just have the 1st letter lower case to differentiate it from its type; I see it done often:

MyType myType = new MyType();

Ok I can’t do this in VB.NET because it is not a case sensitive language so I end up doing all sorts of stuff (keep improving) to create a name for the variable. I realize I can use an underscore “_” in front of the type, but I don’t really like that, as that is also used to denote class level variables (or ‘m’ is used too). So I end up always trying something like:

Dim Typ As New MyType()

Ok it works, but I like the C# way better because it makes so much sense. Just make the 1st letter lowercase.

Any suggestions other than the underscore preceeding the variable name on this topic?

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-23T19:29:26+00:00Added an answer on May 23, 2026 at 7:29 pm

    Using the lower case version of the class name is actually a bad practice in actual code. It’s good for use in code examples because they only show the basic function of a class. But you never use “integer” (or should not) as variable name because it describes what data is stored, not what it’s used for.

    Instead you should choose names that describe what the variable is used for.

    Edit: It’s common practice to use variable names that describe the class because the class often defines what the object is used for. Still you should choose a name specific for the situation, like if you are making a list of errors: instead of stringBuilder you should use allErrorsFound.

    Edit example:

    class Person
    {
        Person friend = new Person();
        public void GetPencil()
        {
            bool pencilFound = 
                friend.AskQuestion(this, "Can I borrow your pencil?")
                .ToLower().Contains("yes");
        }
    
        public string AskQuestion(Person enquirer, string question)
        {
            // Analyze question implications.
            return "Decision made.";
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hopefully this is a simple one, but can anyone provide some simple c# code
This is a (hopefully) really simple question - I have been told recently that
Hopefully an easy question, but I'd quite like a technical answer to this! What's
Hopefully this will not spark a religious war... We have a web based app
Hopefully this is a really quick one ;) I have written a lexer /
Here's a simple (hopefully) L10N question: Do all locales want this format: Sunday, Nov
I'll try to keep this terse, but hopefully won't miss any important information in
I know this is really bad practice, but it's already been put in place
lets get straight to my problem, the code I have written here does not
Hopefully this still falls within StackOverflow's umbrella! I'm looking to create a quick boot

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.