C# Language Specification



Download 0,75 Mb.
bet140/524
Sana06.01.2022
Hajmi0,75 Mb.
#324842
1   ...   136   137   138   139   140   141   142   143   ...   524
Bog'liq
CSharp Language Specification

Identity conversion


An identity conversion converts from any type to the same type. This conversion exists such that an entity that already has a required type can be said to be convertible to that type.

Because object and dynamic are considered equivalent there is an identity conversion between object and dynamic, and between constructed types that are the same when replacing all occurences of dynamic with object.


      1. Implicit numeric conversions


The implicit numeric conversions are:

  • From sbyte to short, int, long, float, double, or decimal.

  • From byte to short, ushort, int, uint, long, ulong, float, double, or decimal.

  • From short to int, long, float, double, or decimal.

  • From ushort to int, uint, long, ulong, float, double, or decimal.

  • From int to long, float, double, or decimal.

  • From uint to long, ulong, float, double, or decimal.

  • From long to float, double, or decimal.

  • From ulong to float, double, or decimal.

  • From char to ushort, int, uint, long, ulong, float, double, or decimal.

  • From float to double.

Conversions from int, uint, long, or ulong to float and from long or ulong to double may cause a loss of precision, but will never cause a loss of magnitude. The other implicit numeric conversions never lose any information.

There are no implicit conversions to the char type, so values of the other integral types do not automatically convert to the char type.



      1. Download 0,75 Mb.

        Do'stlaringiz bilan baham:
1   ...   136   137   138   139   140   141   142   143   ...   524




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish