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

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!

主站蜘蛛池模板: 安龙县| 浦东新区| 宜宾市| 饶阳县| 安塞县| 景洪市| 开平市| 灯塔市| 普兰县| 宁波市| 丰台区| 湄潭县| 句容市| 涞水县| 会同县| 日土县| 合作市| 阜新市| 克什克腾旗| 威信县| 依安县| 方城县| 紫金县| 建水县| 义马市| 嘉鱼县| 东安县| 枣庄市| 漳州市| 邵武市| 广南县| 拉萨市| 永宁县| 澳门| 凤城市| 嘉峪关市| 高雄市| 泾川县| 香格里拉县| 铜川市| 鄄城县|