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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:17:58+00:00 2026-05-26T06:17:58+00:00

I have the following line of code Dim a As String = and the

  • 0

I have the following line of code

Dim a As String = ""

and the Refactor suggests replacing the "" with String.Empty

It is a kind of Reafactoring but why? Since i am a newbie in the future declarations of mine should i better use the String.Empty ?

  • 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-26T06:17:58+00:00Added an answer on May 26, 2026 at 6:17 am

    It’s mostly a matter of preference really. Personally, I find String.Empty more clearly shows the programmer’s intent (for example, that he didn’t accidentally put an empty string instead of a space)… that’s probably why “Refactor” suggests it. But other than that, they’re exactly the same thing. Do as you see fit on this one.

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

Sidebar

Related Questions

I have the following line of code. <%= Html.Encode(string.Join(, , item.company1.companies.Select(x => x.company_name).ToArray())) %>
I have the following line of code in a link on my webpage: <a
I have the following line of code: public bool dcpl_radar() { if (radar ==
I have the following line of code called very often: var configValue = System.Configuration.ConfigurationManager.AppSettings[ConfigValueKey];
I have a unit test which contains the following line of code Site.objects.get(name=UnitTest).delete() and
I have a line of code that gets the following error when run through
Suppose I have a line of code that starts like the following: Func1(Func2(Func3 Is
I have the following code: void foo() { vector<double> v(100,1); // line 1 //
I have a line of PHP code that does the following: $xml = <xml><request>...[snipped
Hallo, i have following line of code: InputStream passoloExportFileInputStream = getClass().getClassLoader().getResourceAsStream(/com/thinkplexx/lang/de/general.xml); and i know

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.