In most cases, no matter what area of software development you are involved in, you will need a functionality of cloning your objects. The .NET Framework provides you 3 ways of achieving your object copying goal:
- Implement the ICloneable interface, and develop cloning functionality manually for each class involved in your desired cloning.
- Serialize you object to binary stream and deserialize it utilizing BinaryFormatter and MemoryStream classes. In this case your classes will need to be Serializable.
- Clone using Reflections.
This article describes how to enhance WPF TextBox and make it accept numeric(integer and floating point) values. The second goal is make the TextBox smart enough to have it easier to input numerics. The easy means to provide the TextBox with some kind of intelligence not just rejecting non-numeric symbols. Provided extension also allows setting minimum and/or maximum values.
Here I describe coding style and conventions you would encounter when going over my source codes. Most of them are easy to follow and understand. Read more…