Study Notes (44): C # fast entry - type conversions (display and implicit)

Learning immediately: https://edu.csdn.net/course/play/20589/257754?utm_source=blogtoedu

1. implicit conversions:

(1) users do not need a control, the compiler automatically recognize

(2) the type of small-scale type of assignment to a wide range of inside, the compiler will automatically help us convert

int a = 15;
double b = a;

2. Display conversion: we need to specify the type of goal conversion

Published 34 original articles · won praise 0 · Views 304

Guess you like

Origin blog.csdn.net/u013162262/article/details/104880433
Recommended