string.split

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alberto

    #1

    string.split

    Can somebody tell an example of how to use the method split?

    Thank you


  • Reb

    #2
    string.split

    String [] ModuleList = Modules.Split(n ew char[] {';'});

    for (int i=0;i<ModuleLis t.Length;i++)
    {
    String moduleSource = ModuleList[i];
    }
    [color=blue]
    >-----Original Message-----
    >Can somebody tell an example of how to use the method[/color]
    split?[color=blue]
    >
    >Thank you
    >
    >
    >.
    >[/color]

    Comment

    • Michael Kremser

      #3
      Re: string.split

      Alberto wrote:
      [color=blue]
      > Can somebody tell an example of how to use the method split?[/color]

      Yes, of course:

      ....
      string[] strsNames = "Michi;Alberto; Susi;Bill".Spli t(';');
      foreach (string strX in strsNames)
      Console.WriteLi ne(strX);
      ....

      But why not reading the documentation?? ?

      i.e.
      http://msdn.microsoft.com/library/de...splittopic.asp

      The .net Framework documentation should ship with the Framework SDK:

      http://www.microsoft.com/downloads/d...displaylang=en

      Best regards,

      Michael

      --
      Michael Kremser


      Comment

      Working...