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. error Array

error Array

Scheduled Pinned Locked Moved C#
data-structureshelp
2 Posts 2 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.
  • T Offline
    T Offline
    TAREQ F ABUZUHRI
    wrote on last edited by
    #1

    i have this error ------ Array initializers can only be used in a variable or field initializer. Try using a new expression instead. ------ with this code oEdit1.CustomButtons = new string[] {{"CustomName1","alert(\'Command 1 here.\')", "Caption 1 here", "btnCustom1.gif"}, {"CustomName2","alert(\\\"Command \'2\' here.\\\")","Caption 2 here","btnCustom2.gif"}, {"CustomName3","alert(\'Command \\\"3\\\" here.\')","Caption 3 here","btnCustom3.gif"}}; do u know how can solve this error

    Palestine

    S 1 Reply Last reply
    0
    • T TAREQ F ABUZUHRI

      i have this error ------ Array initializers can only be used in a variable or field initializer. Try using a new expression instead. ------ with this code oEdit1.CustomButtons = new string[] {{"CustomName1","alert(\'Command 1 here.\')", "Caption 1 here", "btnCustom1.gif"}, {"CustomName2","alert(\\\"Command \'2\' here.\\\")","Caption 2 here","btnCustom2.gif"}, {"CustomName3","alert(\'Command \\\"3\\\" here.\')","Caption 3 here","btnCustom3.gif"}}; do u know how can solve this error

      Palestine

      S Offline
      S Offline
      Steve Hansen
      wrote on last edited by
      #2

      Make that new string[][] { new string[] {"CustomName1","alert(\'Command 1 here.\')", "Caption 1 here", "btnCustom1.gif"}, new string[] {"CustomName2","alert(\\\"Command \'2\' here.\\\")"...

      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