Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 c++ 中,这段代码可以工作:
char c='a'; int r=2; c+=r;
这将与c='c'. 我怎样才能在 c# 中做同样的事情?
c='c'
char在添加之前将其投射到c
char
c
char c='a'; int r=2; c += (char) r;