“`” 答: short s1 = 1; s1 = s1 + 1;有错,s1是short型,s1+1是int型,不能显式 转化为short型。可修改为s1 =(short)(s1 + 1) 。short s1 = 1; s1 += 1正确。 <pre><code> "“` Was this helpful? YesNo 0 / 0 上一篇: 请详述在C#中类(class)与结构(struct)的异同? 下一篇: C#中,string str1 = null 与 string str2 =””请尽量使用文字或图象说明其中的区别 发表回复 取消回复0 Your email address will not be published. 在此浏览器中保存我的显示名称、邮箱地址和网站地址,以便下次评论时使用。