Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Convert string to array in .net

Posted on by 225

Hello Experts,

I am getting the
string str = "["Forecastuser;c30c8811-9519-e911-817c - 000d3a0718d1","Forecast manager; e739f82a - 9519 - e911 - 817c - 000d3a0718d1"]"

Not able to convert string to array.
and i need it in the format string str1 = "[\"Forecast user;c30c8811-9519-e911-817c-000d3a0718d1\",\"Forecast manager;e739f82a-9519-e911-817c-000d3a0718d1\"]"

please suggest me

  • Suggested answer
    Pawar Pravin  Profile Picture
    Pawar Pravin 5,227 on at
    RE: Convert string to array in .net

    Hi Amrutha,

    You can use split function to split string using comma, please refer below url for reference:

    stackoverflow.com/.../whats-the-most-simple-way-to-convert-comma-separated-string-to-int

    asp-net-example.blogspot.com/.../c-example-comma-delimited-string-to.html

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans