如果我有一个现有的字符串,我想在字符串末尾添加更多元素然后我可以添加谁? [英] If I Have A Existing String And I Want To Add More Elements In The String At The End Then Who Can I Add?

查看:55
本文介绍了如果我有一个现有的字符串,我想在字符串末尾添加更多元素然后我可以添加谁?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

示例



如果字符串st =1234;

i想在最后添加更多元素,如



5678结尾,字符串是st =12345678



那么谁能得到这个字符串? ?

Example

if the string st= "1234";
i want to add more element at the end like

5678 at the end and the string is st="12345678"

then who can i get this string???

推荐答案





看一下string.Concat 方法。



您可以使用它们:

Hi,

have a look at the string.Concat Method.

Which you can then use like:
string st="1234";
st=string.Concat(st, "5678");


这篇关于如果我有一个现有的字符串,我想在字符串末尾添加更多元素然后我可以添加谁?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆