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 Char to Decimal in C#
To implicitly convert char to a Decimal, firstly set a char.
char c = 'p';
To convert char to decimal, assign the value.
decimal dec; dec = c;
Let us see the above example.
Example
using System;
public class Demo {
public static void Main() {
char c = 'p';
decimal dec;
Console.WriteLine("Implicit conversion from Char to Decimal");
dec = c;
Console.WriteLine("Decimal : "+dec);
}
}
Output
Implicit conversion from Char to Decimal Decimal : 112
Advertisements
