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. 'WindowsFormsApplication4.character.character()' is inaccessible due to its protection level

'WindowsFormsApplication4.character.character()' is inaccessible due to its protection level

Scheduled Pinned Locked Moved C#
csharpquestion
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
    msheekhah
    wrote on last edited by
    #1

    this is declared inside of the Form1 class in a Windows Form Document c#, VS2008

    protected void loadSTPage()
    {
    character temp = new character();

    what am I doing wrong?

    P 1 Reply Last reply
    0
    • M msheekhah

      this is declared inside of the Form1 class in a Windows Form Document c#, VS2008

      protected void loadSTPage()
      {
      character temp = new character();

      what am I doing wrong?

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      The zero argument constructor for character hasn't been declared as public or internal. In your character class, declare it as:

      public class character
      {
      public character()
      {
      // Do something....
      }
      }

      BTW - it's decent form to declare your class names using something called Pascal casing.

      "WPF has many lovers. It's a veritable porn star!" - Josh Smith

      As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

      My blog | My articles | MoXAML PowerToys | Onyx

      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