static DecimalExtensions() { //return (value.flags & ~int.MinValue) >> 16; var valueParam = Expression.Parameter(typeof(decimal).MakeByRefType(), "value"); var digits = Expression.RightShift( Expression.And( Expression.Field(valueParam, "flags"), Expression.Constant(~int.MinValue, typeof(int))), Expression.Constant(16, typeof(int))); _getPlaces = Expression.Lambda <GetPlaces>(digits, valueParam).Compile(); }
private void button4_Click(object sender, EventArgs e) { GetPlaces places = new GetPlaces(); places.Show(this); }