public class OneRuleToBindThem<T>
public class OneRuleToBindThem<T>{ private T mMinimumValue; private T mMaximumValue; private const string PASS = "Pass"; private const string FAIL = "Fail"; public OneRuleToBindThem(T MinimumValue, T MaximumValue) { mMinimumValue = MinimumValue; mMaximumValue = MaximumValue; } public string Evaluate(T ObservedValue) { string Result = PASS; if (ObservedValue > mMaximumValue) Result = FAIL; if (ObservedValue < mMinimumValue) Result = FAIL; return Result; }}
Operator '>' cannot be applied to operands of type 'T' and 'T'
public class OneRuleToBindThem<T> where T:IComparable{//code you've seen before...}
//code you've seen before...
public string Evaluate(T ObservedValue){
Remember Me
Theme design by Dean Fiala
Pick a theme: BlogXP calmBlue Candid Blue dasBlog Discreet Blog Blue Elegante essence Just Html Mono Movable Radio Blue Movable Radio Heat orangeCream Portal Project84 Slate Sound Waves Tricoleur windmill
Powered by: newtelligence dasBlog 2.1.8102.813
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2008, Dean Fiala
E-mail