public override void SetInitialDialogValues(double lowerUtilityBoundary, double upperUtilityBoundary, double min, double max) { LowerUtilityBoundary = lowerUtilityBoundary; UpperUtilityBoundary = upperUtilityBoundary; UpdateSureValue(); PointToAdd = new PointToAdd(DisplayObject.X, DisplayObject.Lottery.NewPointUtility(), min, max, true); }
static void Main(string[] args) { Stopwatch objWatch = new Stopwatch(); for (int y = 0; y < 10; y++) { objWatch.Reset(); objWatch.Start(); for (int i = 0; i < 1000; i++) { /*With Named Method:*/ //PointToAdd oPointToAdd = Add; /*With Anonymous Method*/ PointToAdd oPointToAdd = delegate(int num1, int num2) { return(num1 + num2); }; int num = oPointToAdd.Invoke(2, 2); //Console.WriteLine(num); } objWatch.Stop(); Console.WriteLine(objWatch.ElapsedTicks.ToString()); } Console.Read(); }
public override void SetInitialDialogValues(double lowerUtilityBoundary, double upperUtilityBoundary, double min, double max) { LowerUtilityBoundary = lowerUtilityBoundary; UpperUtilityBoundary = upperUtilityBoundary; PointToAdd = new PointToAdd( DisplayObject.ComparisonLottery.UpperUtilityValue.X, DisplayObject.EdgeValuesLottery.P / DisplayObject.ComparisonLottery.P, min, max, false ); }
public override void SetInitialDialogValues(double lowerUtilityBoundary, double upperUtilityBoundary, double min, double max) { LowerUtilityBoundary = lowerUtilityBoundary; UpperUtilityBoundary = upperUtilityBoundary; PointToAdd = new PointToAdd(DisplayObject.X, (LowerUtilityBoundary + UpperUtilityBoundary) / 2, min, max, false); }