Skip to main content
Code sample in Swift, C# and Java
Main menu
About
History
Swift
C#
Java
Python
You are here
Home
»
Forums
»
C#
»
C#: Work with simple types
»
C#: Work with numbers
»
C#: Double and float
Converting Double to integer in C#
Submitted by
obraztsov
on Wed, 11/18/2015 - 11:59
Forums:
C#: Double and float
var
pi = 3.1415926535;
var
intValue = (
int
)pi;
//intValue is 3
Log in
to post comments