Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Invalid rank specifier: expected ',' or ']'

Invalid rank specifier: expected ',' or ']'

Scheduled Pinned Locked Moved C#
visual-studiocomhelpquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    msheekhah
    wrote on last edited by
    #1

    powerList = new string[256] {"..." };
    powerIndex = new string[30] {"..." };
    typeIt = new int[256] { 1, ..., 2 };

    am I not doing exactly what it says in MSDN? <a href="http://msdn.microsoft.com/en-us/library/aa288453(VS.71).aspx">msdn

    string[] names = new string[] {"Matt", "Joanne", "Robert"};

    i swear for each stupid mistake I bring you guys, I fix a lot of them on my own...

    F H M 3 Replies Last reply
    0
    • M msheekhah

      powerList = new string[256] {"..." };
      powerIndex = new string[30] {"..." };
      typeIt = new int[256] { 1, ..., 2 };

      am I not doing exactly what it says in MSDN? <a href="http://msdn.microsoft.com/en-us/library/aa288453(VS.71).aspx">msdn

      string[] names = new string[] {"Matt", "Joanne", "Robert"};

      i swear for each stupid mistake I bring you guys, I fix a lot of them on my own...

      F Offline
      F Offline
      fly904
      wrote on last edited by
      #2

      msheekhah wrote:

      am I not doing exactly what it says in MSDN?

      No. Here is why you failed.[^] (After a simple Google[^] search)

      msheekhah wrote:

      i swear for each stupid mistake I bring you guys, I fix a lot of them on my own...

      That's why everyone(except you) looks for answers on Google[^] first rather than posting here.

      My failometer is detecting vast quantities of FAIL! "Its SQL - hardly programming..." (Caslen)

      1 Reply Last reply
      0
      • M msheekhah

        powerList = new string[256] {"..." };
        powerIndex = new string[30] {"..." };
        typeIt = new int[256] { 1, ..., 2 };

        am I not doing exactly what it says in MSDN? <a href="http://msdn.microsoft.com/en-us/library/aa288453(VS.71).aspx">msdn

        string[] names = new string[] {"Matt", "Joanne", "Robert"};

        i swear for each stupid mistake I bring you guys, I fix a lot of them on my own...

        H Offline
        H Offline
        Henry Minute
        wrote on last edited by
        #3

        Without seeing the declarations for powerList, powerIndex and typeIt it is not possible to be absolutely sure. Also are the ellipses meant to indicate that you have fully initialised the arrays, or are they what you have literally typed in your code. Lastly it would be very helpful to know on which line the error occurs.

        Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

        1 Reply Last reply
        0
        • M msheekhah

          powerList = new string[256] {"..." };
          powerIndex = new string[30] {"..." };
          typeIt = new int[256] { 1, ..., 2 };

          am I not doing exactly what it says in MSDN? <a href="http://msdn.microsoft.com/en-us/library/aa288453(VS.71).aspx">msdn

          string[] names = new string[] {"Matt", "Joanne", "Robert"};

          i swear for each stupid mistake I bring you guys, I fix a lot of them on my own...

          M Offline
          M Offline
          Member 1033907
          wrote on last edited by
          #4

          Hey, a few days ago you claimed you knew OOP and C++, now it looks like we are getting updates on every line of you code because you can't get it to work. You should really get some basic info on C# so that you can write or at least google something yourself, for a change.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups