1string text = node != null ? node.InnerText : null;
1string text = null; 2if (node != null) 3{ 4 text = node.InnerText; 5}
1// 当 node 为 null 时,text 会被赋值为 string.Empty 2string text = (node != null ? node.InnerText : null) ?? string.Empty;
渝公网安备 50011902000225号
渝ICP备18008233号-1