Click here to Skip to main content
15,893,622 members
Articles / Programming Languages / C#

How to perform arithmetic operations between any objects by inheriting a common arithmetic parent class in .NET 4.

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
8 Apr 2011CPOL1 min read 20.1K   3  
Performing arithmetic operations between objects need to define overloaded operators and restricted to defined types in those method. This code provides an alternate flexible way.

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
8 Apr 2011Chris Trelawny-Ross
You got me thinking about other ways to accomplish "objects that are not numbers honoring math operators without implementing the operators on the objects."I'm too long in the tooth of strongly typed languages to have a good comfort level with all things dynamic (although reading about the...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
India India
I am developer in .Net and GIS. albin_gis@yahoo.com

Comments and Discussions