I want to divide size of a control with a size of a form and want to gets its floor value.
I was thinking what would be returned when I try to divide an integer with an integer and store its result again in an integer
.
I want only floor value. I tried to use Math.Floor
, Math.Truncate
but it shows me an error that call between following methods is ambigious
because compiler is not able to understand what type of value will be returned after diving i.e. decimal or Double.
Will it return me floor value if i dont use any such function. I want only floor value.
Nullable<int> PanelCountInSingleRow = null;
Nullable<int> widthRemainder = null;
//setting the size of the panel
CurrentControlSize = PanelView.Size;
//Calculate no of Panels that can come in a single row.
PanelCountInSingleRow = Math.Floor(this.Size.Width / CurrentControlSize.Width);