- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Implicit conversion from 8-bit signed integer (SByte) to Decimal in C#
SByte represents an 8-bit signed integer.
To implicitly convert an 8-bit signed integer to a Decimal, firstly set an sbyte value.
sbyte val = 51;
To convert sbyte to decimal, assign the value.
decimal d; d = val;
Let us see another example.
Example
using System; public class Demo { public static void Main() { sbyte val = 39; decimal d; Console.WriteLine("Implicit conversion from 8-bit signed integer (sbyte) to Decimal"); d = val; Console.WriteLine("Decimal = "+dec); } }
Advertisements