Answers for "c# substring until character single"

C#
0

c# substring until character single

static void Main(string[] args)
{
    string s = "223232-1.jpg";
    Console.WriteLine(s.Split('-')[0]);
    s = "443-2.jpg";
    Console.WriteLine(s.Split('-')[0]);
    s = "34443553-5.jpg";
    Console.WriteLine(s.Split('-')[0]);

Console.ReadKey();
}
Posted by: Guest on August-12-2021

Code answers related to "c# substring until character single"

C# Answers by Framework

Browse Popular Code Answers by Language