web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Differences of single quotes and double quotes for text string

(0) ShareShare
ReportReport
Posted on by

Hi all,

Any differences if we use single quotes or double quotes for text string ?

For example in variable assignment or in select query condition ?

Is there any rule, lets say Best Practice rule for this ?

Thanks,

V

I have the same question (0)
  • Blue Wang Profile Picture
    on at
    RE: Differences of single quotes and double quotes for text string

    Hi Voltes,

    Sorry, the link in the first reply is earlier, you can see this: docs.microsoft.com/.../xpp-cs-comparison

    Search "Single" in Doc, you will find a lot.

  • Blue Wang Profile Picture
    on at
    RE: Differences of single quotes and double quotes for text string

    Hi VoltesDev,

    Yes, there are specific situations that will make a difference.

    For example, constants, or expressions in the query range use single quotes.

    You can find some from here:

    https://docs.microsoft.com/en-us/dynamicsax-2012/developer/x-standards-constants

    http://www.axaptapedia.com/Expressions_in_query_ranges

  • VoltesDev Profile Picture
    on at
    RE: Differences of single quotes and double quotes for text string

    Hi Blue,

    I think it is different. I'm sorry, but I had to ask is the document you're sharing has a updated one that more comply with F&O current version ?

    My finding is for text string use for variable / field assignment and X++ select query it is better to use single quotes, so it will not break BP Rule for Label Id.

    Thanks,

  • Blue Wang Profile Picture
    on at
    RE: Differences of single quotes and double quotes for text string

    HI VoltesDev,

    Supplement to mingzhou's reply, please refer to this:

    6518.PNG

    https://docs.microsoft.com/en-us/dynamicsax-2012/developer/x-csharp-comparison-string-case-and-delimiters

  • Mingzhou Deng Profile Picture
    on at
    RE: Differences of single quotes and double quotes for text string

    There is no difference in x++ code.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 777 User Group Leader

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 630 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 602 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans