i have several classes with members called \'Id\'. Originally i wanted to store these as ints, but i would like some layer of protection, to make sure i don\'t accidentally
public static explicit operator RoomId(int value) { return new RoomId { Id = value }; }
You could then do:
RoomId variable = (RoomId)10;
It's not possible to derive a class from Int32 or any other value type in C#.
Int32