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.
我正在尝试用查询替换这个for-each循环。Linq这个循环正在扼杀性能。str包含list<string>. 我必须从每个字符串中一一读取str并对其进行编码,然后我需要使用AMQ.
for-each
Linq
str
list<string>
AMQ
foreach (var item in str) { byte[] bytes = Encoding.UTF8.GetBytes(item); publisher.SendMessage(bytes); }