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
  1. Home
  2. General Programming
  3. C#
  4. Error: "No overload method for 'class' takes 'n' arguments"

Error: "No overload method for 'class' takes 'n' arguments"

Scheduled Pinned Locked Moved C#
csharpvisual-studiohelpquestion
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.
  • M Offline
    M Offline
    Merrin
    wrote on last edited by
    #1

    Hi all, I've got a DataRow inherited class like this: public class CustomDataRow : DataRow { new public this[string columnName] { get { [...] } set { [...] } } } When compiling, Visual Studio shows this error: "No overload method for 'DataRow' takes '0' arguments" I tried to add a default constructor like... public class CustomDataRow : DataRow { public CustomDataRow() { } new public this[string columnName] { get { [...] } set { [...] } } } ...but error continues. Any idea? Thanks in advance. :confused:

    G 1 Reply Last reply
    0
    • M Merrin

      Hi all, I've got a DataRow inherited class like this: public class CustomDataRow : DataRow { new public this[string columnName] { get { [...] } set { [...] } } } When compiling, Visual Studio shows this error: "No overload method for 'DataRow' takes '0' arguments" I tried to add a default constructor like... public class CustomDataRow : DataRow { public CustomDataRow() { } new public this[string columnName] { get { [...] } set { [...] } } } ...but error continues. Any idea? Thanks in advance. :confused:

      G Offline
      G Offline
      Greg Hack
      wrote on last edited by
      #2

      DataRow does not have any public constructors, therefore your cannot derive a new class from it. This situation exists for many classes in System.Data and System.Xml namespaces. Greg

      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