【发布时间】:2021-05-30 23:36:44
【问题描述】:
我一直在寻找这个,但我似乎找不到答案。 我想要完成的是:
现在,当我使用嵌入回复时,它会显示例如: 足球,棒球
但我想要的是以下内容:
足球,
棒球
分布在 2 个不同的行上。
有谁知道如何使用文本代码做到这一点? 提前谢谢你
代码如下:
var value = "";
int price = 0;
foreach (var Item in content)
{
value += Item.Item1 + ": " + Item.Item2.ToString();
price += Item.Item2;
}
return new EmbedFieldBuilder()
{
Name = category + " - " + price,
Value = value
};
【问题讨论】:
-
请您分享您目前拥有的代码吗?
-
请您提供足够的代码来重现该问题?
-
什么意思?这绰绰有余,我刚刚知道如何在不和谐字段嵌入中转到下一行?
-
我的意思是请provide a piece of code that can be run that will produce the output that you said it would。在您的示例中,我没有看到
footbal或baseball或任何逗号。 -
这能回答你的问题吗? Adding a newline into a string in C#