顺便问问 10/3=4 这个要怎么实现 
也就是除的话有小数就取+1的整数 ===
ceiling

解决方案 »

  1.   

     int i = (10 % 3 == 0) ? 10 / 3 : (10 / 3) + 1;
                Response.Write(i.ToString());
      

  2.   

    Math.Ceiling((decimal)10 / 3)
      

  3.   

     gAll.DrawImage(g, 0, top);
     无法从“System.Drawing.Graphics”转换为“System.Drawing.Image”
      

  4.   

    幕白兄好久没有见到你了
    真高兴啊我换新工作了
    谢谢你
    还有恭喜成为MVP
      

  5.   

     Bitmap b1 = new Bitmap(500, 500);
            Graphics g1 = Graphics.FromImage(b1);
            g1.Clear(Color.Red);
            g1.Dispose();        Bitmap b2 = new Bitmap(500, 500);
            Graphics g2 = Graphics.FromImage(b2);
            g2.Clear(Color.Blue);
            g2.Dispose();        Bitmap bAll = new Bitmap(500, 1000);
            Graphics gAll = Graphics.FromImage(bAll);
            gAll.DrawImage(b1, 0, 0);
            gAll.DrawImage(b2, 0, b1.Width);
            gAll.Dispose();        ///显示测试
            System.IO.MemoryStream ms = new System.IO.MemoryStream();
            bAll.Save(ms, System.Drawing.Imaging.ImageFormat.Gif);
            Response.ClearContent();
            Response.ContentType = "image/Gif";
            Response.BinaryWrite(ms.ToArray());
            ///把10转换一下类型 比如 10.0
            int Result = Math.Ceiling((decimal)10 / 3);