System.Math.Math.Round C# (CSharp) 메소드

Round() 공개 정적인 메소드

public static Round ( double value, int digits, MidpointRounding mode ) : double
value double
digits int
mode MidpointRounding
리턴 double
		public static double Round (double value, int digits, MidpointRounding mode)
		{
			if ((mode != MidpointRounding.ToEven) && (mode != MidpointRounding.AwayFromZero))
				throw new ArgumentException ("The value '" + mode + "' is not valid for this usage of the type MidpointRounding.", "mode");

			if (mode == MidpointRounding.ToEven)
				return Round (value, digits);
			else
				return Round2 (value, digits, true);
		}
		

Same methods

Math.Math::Round ( decimal d ) : decimal
Math.Math::Round ( decimal d, MidpointRounding mode ) : decimal
Math.Math::Round ( decimal d, int decimals ) : decimal
Math.Math::Round ( decimal d, int decimals, MidpointRounding mode ) : decimal
Math.Math::Round ( double a ) : double
Math.Math::Round ( double value, MidpointRounding mode ) : double
Math.Math::Round ( double value, int digits ) : double