Clearing a few warnings in a C# project that I inherited found this piece of code:
private bool _WriteValue(object FieldValue,..,..) ... if(MultipFactor!=1) FieldValue=((double)FieldValue)*MultipFactor; else FieldValue=FieldValue;
I obviously burned the else block without thinking too much, just wondering why the previous programmer left this part.
- Was it too lazy to delete it?
- Has some future programmers considered maintaining some typing in the event of specific changes?
- Does this hide something dangerous?
In your opinion, are there any real circumstances when foo=foo makes sense?
Additional information about the _WriteValue method:
The _WriteValue method _WriteValue enclosed in various overloaded WriteValue methods, which are passed to the object FieldValue WriteValue parameter, the values ββof the following types: int , long , string and Datetime .
source share