Decimal radius=0;Decimal length=0; public void SmallRadiusDepthcal(string Radius, string Length) { if (!decimal.TryParse(Radius, out radius)) { radius = 0; } if (!decimal.TryParse(Length, out length)) { length = 0; } if (length != 0 && radius != 0) { decimal FEED; decimal Squre; decimal Dep; decimal Div = 4; Double Ans; // FEED = ((length * length) - (radius * radius) / Div); Ans = Math.Sqrt((double)FEED); Squre = (decimal)Ans; Dep = radius - Squre; FPM = Math.Round(Dep, 2).ToString(); //=I26-SQRT((I26*I26)-(G27*G27/4))// } else { FPM = "0.0000"; } }
But I have Run Time Error (Value was either too large or too small for a Decimal.) How Can I solve This Problem. Please Help Me !!!
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)