❔ check if string is valid guid without guid.TryParse
as in title, i would like to avoid conditions like
if (!Guid.TryParse(string, out var _))
, instead i want something like if (!Guid.IsValid(string))
7 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
TryParse would be great here, but as you've mentioned to avoid it, here's what you can actually do:
That's just a slower version of
TryParse
ikr?
so i will stick with guid.tryparse 😄
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.