<bdo id='aeiSw'></bdo><ul id='aeiSw'></ul>
<i id='aeiSw'><tr id='aeiSw'><dt id='aeiSw'><q id='aeiSw'><span id='aeiSw'><b id='aeiSw'><form id='aeiSw'><ins id='aeiSw'></ins><ul id='aeiSw'></ul><sub id='aeiSw'></sub></form><legend id='aeiSw'></legend><bdo id='aeiSw'><pre id='aeiSw'><center id='aeiSw'></center></pre></bdo></b><th id='aeiSw'></th></span></q></dt></tr></i><div id='aeiSw'><tfoot id='aeiSw'></tfoot><dl id='aeiSw'><fieldset id='aeiSw'></fieldset></dl></div>

      <small id='aeiSw'></small><noframes id='aeiSw'>

        <legend id='aeiSw'><style id='aeiSw'><dir id='aeiSw'><q id='aeiSw'></q></dir></style></legend><tfoot id='aeiSw'></tfoot>
      1. 如何将字符串拆分为多个值?

        时间:2023-10-07

        <i id='NhHT3'><tr id='NhHT3'><dt id='NhHT3'><q id='NhHT3'><span id='NhHT3'><b id='NhHT3'><form id='NhHT3'><ins id='NhHT3'></ins><ul id='NhHT3'></ul><sub id='NhHT3'></sub></form><legend id='NhHT3'></legend><bdo id='NhHT3'><pre id='NhHT3'><center id='NhHT3'></center></pre></bdo></b><th id='NhHT3'></th></span></q></dt></tr></i><div id='NhHT3'><tfoot id='NhHT3'></tfoot><dl id='NhHT3'><fieldset id='NhHT3'></fieldset></dl></div>
          <bdo id='NhHT3'></bdo><ul id='NhHT3'></ul>
          <tfoot id='NhHT3'></tfoot>

            <tbody id='NhHT3'></tbody>
            • <legend id='NhHT3'><style id='NhHT3'><dir id='NhHT3'><q id='NhHT3'></q></dir></style></legend>

                • <small id='NhHT3'></small><noframes id='NhHT3'>

                  本文介绍了如何将字符串拆分为多个值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何拆分字符串?

                  假设我有一个字符串狗、猫、老鼠、鸟"

                  Lets say i have a string "dog, cat, mouse,bird"

                  我的实际目标是将这些动物中的每一个都插入到一个列表框中,这样它们就会成为列表框中的项目.

                  My actual goal is to insert each of those animals into a listBox, so they would become items in a list box.

                  但如果我知道如何拆分字符串,我想我知道如何插入这些项目.或者有人知道更好的方法吗?

                  but i think i get the idea on how to insert those items if i know how to split the string. or does anyone know a better way to do this?

                  我使用asp c#

                  推荐答案

                      string[] tokens = text.Split(',');
                  
                      for (int i = 0; i < tokens.Length; i++)
                      {
                            yourListBox.Add(new ListItem(token[i], token[i]));
                      }
                  

                  这篇关于如何将字符串拆分为多个值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何在可导航的应用程序中支持 ListBox SelectedItems 与 MVVM 的绑定 下一篇:如何在 WinForms 中将字典绑定到 ListBox

                  相关文章

                • <i id='fgiE3'><tr id='fgiE3'><dt id='fgiE3'><q id='fgiE3'><span id='fgiE3'><b id='fgiE3'><form id='fgiE3'><ins id='fgiE3'></ins><ul id='fgiE3'></ul><sub id='fgiE3'></sub></form><legend id='fgiE3'></legend><bdo id='fgiE3'><pre id='fgiE3'><center id='fgiE3'></center></pre></bdo></b><th id='fgiE3'></th></span></q></dt></tr></i><div id='fgiE3'><tfoot id='fgiE3'></tfoot><dl id='fgiE3'><fieldset id='fgiE3'></fieldset></dl></div>

                  <small id='fgiE3'></small><noframes id='fgiE3'>

                  • <bdo id='fgiE3'></bdo><ul id='fgiE3'></ul>

                  <tfoot id='fgiE3'></tfoot>
                  <legend id='fgiE3'><style id='fgiE3'><dir id='fgiE3'><q id='fgiE3'></q></dir></style></legend>