i need to take out 4 only from string
is it possible?
Image(4).jpg
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Rajeesh MenothRank #118 · 18.4K reputationPosted Nov 19, 2015, 1:32 AM EST
Senzeye96 reputationPosted Nov 19, 2015, 1:35 AM EST
Praveen DhatrikaRank #3,145 · 455 reputationPosted Nov 18, 2015, 5:53 AM EST
Banketeshvar NarayanRank #235 · 10.5K reputationPosted Nov 18, 2015, 7:43 AM EST
String str = "Image(4).jpg";
int index = str.IndexOf('4');
char result = str.ToCharArray()[index];
Console.WriteLine(result);
Imtiyaz AnsariRank #1,031 · 1.9K reputationPosted Nov 19, 2015, 1:03 AM EST
SL G48 reputationPosted Nov 19, 2015, 1:26 AM EST