官术网_书友最值得收藏!

Assigning null with explicit casting

Again, although it doesn't make sense to use explicit casting with null to assign it to a var type, it is a valid code, shown as follows:

var name = (String)null;             // Code compiles 

Though the preceding line of code is correct syntax-wise, it is a bad coding practice. Avoid it!

主站蜘蛛池模板: 汝城县| 石楼县| 平江县| 错那县| 蒙城县| 广元市| 伽师县| 岱山县| 工布江达县| 广水市| 星座| 明光市| 余庆县| 绿春县| 高台县| 专栏| 昔阳县| 二连浩特市| 黑龙江省| 清镇市| 桃源县| 中山市| 会昌县| 灵石县| 白沙| 米林县| 广东省| 梧州市| 勃利县| 图木舒克市| 苗栗县| 鄄城县| 庐江县| 尼勒克县| 沛县| 岳池县| 利辛县| 大竹县| 宁城县| 洪雅县| 晋中市|