For the coders out there, you may be familiar with C#, and how it includes "get" and "set" functions. I was thinking there should be a third function called "compare". Many times in code, I need to know if a value matches what an object has in a property. Rather than using "get" and writing extraneous code over and over, why not a simple "compare"?
Example:
tempvar = object.property.get()
if (tempvar = comparevar) ...
if (object.property.compare(comparevar)) ...
It probably gets more complicated than that, but you get the idea
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment