© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
41 replies
js

manipulating string

foreach (var pizza2 in pizzas)
{
    if (selection <= FoodMenu.pizzas.Count)
    {
        string temp = pizza2.ToString();
        string name = temp.Substring(0, temp.IndexOf(","));
        string toppings = temp.Substring(name.Length, );
        int price = int.Parse((""));
        Pizza pizza = new Pizza(name, toppings, price);
    }
}
foreach (var pizza2 in pizzas)
{
    if (selection <= FoodMenu.pizzas.Count)
    {
        string temp = pizza2.ToString();
        string name = temp.Substring(0, temp.IndexOf(","));
        string toppings = temp.Substring(name.Length, );
        int price = int.Parse((""));
        Pizza pizza = new Pizza(name, toppings, price);
    }
}
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Manipulating Strings
C#CC# / help
15mo ago
❔ ✅ Manipulating JSON
C#CC# / help
3y ago
question about strings & stringbuilder!
C#CC# / help
2y ago