Extract integral part of a decimal number in C#? Forum Home › Forums › Understanding the Software › Using Formulas › Extract integral part of a decimal number in C#? This topic has 3 replies, 2 voices, and was last updated 3 years, 10 months ago by Mikhail. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts June 17, 2020 at 9:12 pm #6914 HoracioParticipant The title explains my question. How to do it in C#? Thank you very much. June 18, 2020 at 11:10 am #6915 MikhailModerator You can use the Math class: Math.Ceiling(Cnl) Math.Floor(Cnl) or just (int)Cnl June 18, 2020 at 8:43 pm #6916 HoracioParticipant Hello! (int)Cnl worked fine. By the way, I found a “C# Online Compiler” on dotnetfiddle.net that allows to evaluate and test C# expressions. Easy and very helpful. Thank you very much. Regards June 19, 2020 at 9:15 am #6919 MikhailModerator By the way, I found a “C# Online Compiler” on dotnetfiddle.net Good idea! Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In