Link to home
Start Free TrialLog in
Avatar of stephenlecomptejr
stephenlecomptejrFlag for United States of America

asked on

Unsure how to handle Invalid token 'int' in class, struct, or interface member declaration error

I am extremely new to C# and I get the following error with int highlighted at every line item:

Invalid token 'int' in class, struct, or interface member declaration

How do I fix the syntax below to work properly?
The following was taken from Sams Teach Yourself Microsoft Visual C#.NET 2003 in 24 hours on page 352.
Also - I hate the way my IDE in 2003 keeps trying to tab the braces once I press <ENTER> on a line item - it is not helping to much as I type in these examples.  Any suggestions is much appreciated - Stephen

using System;

namespace Class_Programming_Example
{
      /// <summary>
      /// Summary description for clsMyClass.
      /// </summary>
      public class clsMyClass
      {
      Private int m_intHeight;

      Public int Height
            {
                  get
                  {
                        return m_intHeight;
                  }
                  set
                  {  
                        m_intHeight = value;
                  }
            }
            public clsMyClass()
            {
            
                  //
                  // TODO: Add constructor logic here
                  //
            }
      }
}
ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial