

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
C# Numeric Promotion
Numeric promotion as the name suggests is the promotion of smaller types to larger types like short to int.
In the below example, we have seen numeric promotion in Arithmetic Operator multiply.
The short types are automatically promoted to larger types −
Example
using System; class Program { static void Main() { short val1 = 99; ushort val2 = 11; int res = val1 * val2; Console.WriteLine(res); } }
- Related Questions & Answers
- C# Numeric Promotion for Conditional Expression
- Java Numeric Promotion in Conditional Expression
- Constructor Property Promotion in PHP 8
- method overloading and type promotion in Java
- Which is the popular event promotion website in Hyderabad?
- Python Numeric Types
- Perl Numeric Scalars
- Mobile Numeric Keypad Problem
- Explain the concept of LOCK PROMOTION with the help of an example
- Numeric for in Lua Programming
- List out the default values of numeric and non-numeric primitive data types in Java?
- Sorting objects by numeric values - JavaScript
- How to find the correlation for data frame having numeric and non-numeric columns in R?
- Manipulate decimals with numeric operators in C#
- C# Numeric (“N”) Format Specifier
Advertisements