If I have a pipe separated list can I split them automatically into an array of GUID’s?
So
“guid1|guid2”
and then Guid[] values = selectedValue.Split("|".ToCharArray()); would have been nice.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Almost:
If any of the Guids isn’t valid, this will throw a FormatException though.
If you want to ignore them, you can do what Jeremy suggest in the comments:
Maybe this can be optimized further (We’re essentially parsing each number twice) or simply ignored as the 97% premature optimizations that don’t matter.