Guid
how to change/ convert Guid to a seven character .i.e 94E7D0FD-2627-4D37-90A5-D8F7A01B4D41 to something like 94E7D0FD
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
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
Michal HabalcikRank #902 · 2.3K reputationPosted Jan 15, 2015, 12:49 AM EST
string s = "94E7D0FD-2627-4D37-90A5-D8F7A01B4D4".Substring(0,7);
should give you "94E7D0F"
Khargesh RajputRank #616 · 3.9K reputationPosted Jan 15, 2015, 12:08 AM EST
label.Text= str.Substring(0, str.Length - 8);
Carlos kambuiRank #2,642 · 528 reputationPosted Jan 15, 2015, 12:58 AM EST
Michal HabalcikRank #902 · 2.3K reputationPosted Jan 15, 2015, 12:59 AM EST