Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Implicit conversion from Int32 to Decimal in C#
The int type represents a 32-bit signed integer i.e. Int32.
To implicitly convert an Int32 to a Decimal, firstly set a Int32 value.
int val = 392;
To convert Int32 to decimal, assign the value.
decimal d; d = val;
Let us see another example.
Example
using System;
public class Demo {
public static void Main() {
int val = 767;
decimal d;
Console.WriteLine("Implicit conversion from Int32 (integer) to Decimal");
d = val;
Console.WriteLine("Decimal : "+dec);
}
} Advertisements
