Home
Tool
Json Beautify
Find Web URL
Inventory Management System
Test Mantra RD Service
Calculate your EMI
Project
Inventory Management System
Task Management
Project Management
Mobile Store Management
Money Transfer Tool
Store Management
About Us
Contact
Login
Registration
Search
ASP.net,C-Sharp,MVC,WCF,WPF
C# Type Casting : cast double to int.
By
Csharp Code
Apr 29 2020
1571 View's
0 Comment's
Like (
0
)
Dislike (
0
)
Casting must be done manually by placing the type in parentheses in front of the value.
double myDouble = 11.78;
int myInt = (int) myDouble; // Manual casting: double to int
Console.WriteLine(myDouble); // Outputs 11.78
Console.WriteLine(myInt); // Outputs 11
0 Comment's
Comment Form
Submit Comment
Csharp Code
If opportunity doesn’t knock, build a door.⛩
Popular Post
WPF
How to Use Logger in WPF Application
By
Csharp Code
Jun 07 2022
C-Sharp
Update Specific Users Out of Oce Settings C# with Example
By
Csharp Code
Jun 06 2022
C-Sharp
Retrieve Specified User''s Out of O ce Settings C# with Example
By
Csharp Code
Jun 06 2022
C-Sharp
Large Object Heap compaction C# with Example
By
Csharp Code
Jun 06 2022
C-Sharp
Weak References C# with Example
By
Csharp Code
Jun 06 2022
C-Sharp
Source code in the view C# with Example
By
Csharp Code
Jun 06 2022
Notifications