While I'm learning about format, will it work with strings?
I want to take this string
dim thisCustNo as string = "9128764526 "
and make it look like
(912)876-4526
I found I can do this
thisCustNo.Form at("({0}){1}-{2}",thisCustNo .Substring(0,3) ,thisCustNo.Sub string(3,3),thi sCustNo.Substri ng(6,4))
But for me that isn't a bit easier or clearer or nicer than
"("+thisCustNo. Substring(0,3)+ ")"+thisCustNo. Substring(3,3)+ "-"+thisCustNo.Su bstring(6,4)
Am I missing something?
I want to take this string
dim thisCustNo as string = "9128764526 "
and make it look like
(912)876-4526
I found I can do this
thisCustNo.Form at("({0}){1}-{2}",thisCustNo .Substring(0,3) ,thisCustNo.Sub string(3,3),thi sCustNo.Substri ng(6,4))
But for me that isn't a bit easier or clearer or nicer than
"("+thisCustNo. Substring(0,3)+ ")"+thisCustNo. Substring(3,3)+ "-"+thisCustNo.Su bstring(6,4)
Am I missing something?
Comment