G
Guest
I can't believe I can't find anything on this and feel free to publicly
humiliate me as long as you can provide an answer. I need to create a class
that looks and acts like an Int32 with additional functionality.
For example it should default to -1 and prevent negative values < -1, have a
HasDefaultValue property that returns true if it is still -1, etc. It should
also accept assignment using = rather than having to use var.Value = 1. It
should be a transparent replacement for Int32 (int) with additional
functionality.
I’m not looking for a complete source code example, but I assume there is a
pre-existing resource out there on the web somewhere in the form of a
tutorial or C# 101 example.
Thanks in advance for any help you can provide.
humiliate me as long as you can provide an answer. I need to create a class
that looks and acts like an Int32 with additional functionality.
For example it should default to -1 and prevent negative values < -1, have a
HasDefaultValue property that returns true if it is still -1, etc. It should
also accept assignment using = rather than having to use var.Value = 1. It
should be a transparent replacement for Int32 (int) with additional
functionality.
I’m not looking for a complete source code example, but I assume there is a
pre-existing resource out there on the web somewhere in the form of a
tutorial or C# 101 example.
Thanks in advance for any help you can provide.