public Dictionary<string, System.Drawing.RotateFlipType> dicRFT = new Dictionary<string, System.Drawing.RotateFlipType>() { {"90", System.Drawing.RotateFlipType.Rotate90FlipNone},{"180", System.Drawing.RotateFlipType.Rotate180FlipNone},{"270", System.Drawing.RotateFlipType.Rotate270FlipNone} };
调用:dicRFT[iAngle.ToString()]
如果写if的话得写三个
用Dictionary代替if
时间: 2024-12-10 20:02:00