Results 1 to 5 of 5

Thread: syntax problem, whats the correct way to write it?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227

    syntax problem, whats the correct way to write it?

    Code:
    dim a() as String=section.Attributes("type").Value.Split(new char(){','})
    whats the problem ?how should we write this?!

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    What do you mean? Are you getting an error?

  3. #3
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    What are you trying to do with that?
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Is section an XMLNode? Also Split returns an array but you didn't specific what element in the array to assign to the string.

    Try:

    dim a() as String=section.Attributes("type").Value.Split(new char(){','})(0)

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    yeah section is a xmlnode, the only thing was that i had to use " instead of '

    Code:
    dim a() as String=section.Attributes("type").Value.Split(new char(){","})

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width