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

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!

主站蜘蛛池模板: 大关县| 东莞市| 博客| 治县。| 宜城市| 三明市| 宁都县| 龙海市| 太白县| 神农架林区| 芜湖市| 美姑县| 湘阴县| 定襄县| 鄱阳县| 鹤庆县| 禄丰县| 蛟河市| 郧西县| 凌云县| 司法| 乌拉特中旗| 霍州市| 西城区| 息烽县| 京山县| 达拉特旗| 龙泉市| 台安县| 尼木县| 化德县| 商水县| 崇州市| 江山市| 正宁县| 甘南县| 京山县| 恩施市| 桂平市| 筠连县| 乌拉特后旗|