Josef Ottosson

Josef Ottosson

Freelancing Developer · Microsoft MVP

Subscribe via RSS
© Josef Ottosson 2021
Ghost & StayPuft

enum

A collection of 1 post

enum

Beware of Enum.TryParse

What do you think Enum.TryParse will return when running this code? public enum ContactMethod { Unknown = 0, Email = 1, Phone = 2 } var result = Enum.TryParse("10", out ContactMethod contactMethod); "It

a year ago March 15th, 2020 1 min read
Subscribe via RSS
© Josef Ottosson 2021
Ghost & StayPuft