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

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!

主站蜘蛛池模板: 共和县| 泰宁县| 图们市| 邢台县| 阿图什市| 渭源县| 璧山县| 鄱阳县| 榆林市| 万宁市| 西青区| 万盛区| 沭阳县| 定日县| 诸城市| 永修县| 施秉县| 喀喇沁旗| 莒南县| 富宁县| 丰镇市| 如皋市| 嵩明县| 浦江县| 资溪县| 南宁市| 九寨沟县| 阿克陶县| 岳普湖县| 扎赉特旗| 金溪县| 高尔夫| 手机| 工布江达县| 延吉市| 龙口市| 丰城市| 南汇区| 固安县| 类乌齐县| 金乡县|