Class limitations

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Smokey Grindle

    #1

    Class limitations

    Is there any real or virtual class size limitations? such as number of
    methods, properties or fields? I know its bad practice to make a class
    outragiously large, but was just wondering if there was any. thanks!


  • Charlie Brown

    #2
    Re: Class limitations

    On May 24, 10:07 am, "Smokey Grindle" <nos...@nospam. comwrote:
    Is there any real or virtual class size limitations? such as number of
    methods, properties or fields? I know its bad practice to make a class
    outragiously large, but was just wondering if there was any. thanks!
    I can't imagine there is one, but I'm no expert on things like that.
    However, I have seen classes that were very large in production
    applications running without problem. Curiousity or do you have a 300
    Method class on the way?

    Comment

    • Patrice

      #3
      Re: Class limitations

      You could easily do some code that creates a class with dummy members for a
      test. IMO the limit is likely theorical...

      "Smokey Grindle" <nospam@nospam. coma écrit dans le message de news:
      OWkUizgnHHA.716 @TK2MSFTNGP05.p hx.gbl...
      Is there any real or virtual class size limitations? such as number of
      methods, properties or fields? I know its bad practice to make a class
      outragiously large, but was just wondering if there was any. thanks!
      >

      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: Class limitations

        "Smokey Grindle" <nospam@nospam. comschrieb:
        Is there any real or virtual class size limitations? such as number of
        methods, properties or fields? I know its bad practice to make a class
        outragiously large, but was just wondering if there was any. thanks!
        I believe there is no practically relevant limit.

        --
        M S Herfried K. Wagner
        M V P <URL:http://dotnet.mvps.org/>
        V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

        Comment

        • Cor Ligthert [MVP]

          #5
          Re: Class limitations

          Smokey,

          Everything inherits from one class and that class has than many members.

          "Object"

          Cor

          "Smokey Grindle" <nospam@nospam. comschreef in bericht
          news:OWkUizgnHH A.716@TK2MSFTNG P05.phx.gbl...
          Is there any real or virtual class size limitations? such as number of
          methods, properties or fields? I know its bad practice to make a class
          outragiously large, but was just wondering if there was any. thanks!
          >

          Comment

          • =?ISO-8859-1?Q?G=F6ran_Andersson?=

            #6
            Re: Class limitations

            Smokey Grindle wrote:
            Is there any real or virtual class size limitations? such as number of
            methods, properties or fields? I know its bad practice to make a class
            outragiously large, but was just wondering if there was any. thanks!
            >
            There might be some limitations in the compiler or in the file format
            for the compiled code. I would expect to see something like a limit of
            2147483647 methods in a class.

            IIRC 32 bit code can not handle memory structures larger than 4 GB.

            --
            Göran Andersson
            _____
            Göran Anderssons privata hemsida.

            Comment

            • Smokey Grindle

              #7
              Re: Class limitations

              just curious

              "Charlie Brown" <cbrown@duclaw. comwrote in message
              news:1180016581 .164073.130400@ m36g2000hse.goo glegroups.com.. .
              On May 24, 10:07 am, "Smokey Grindle" <nos...@nospam. comwrote:
              >Is there any real or virtual class size limitations? such as number of
              >methods, properties or fields? I know its bad practice to make a class
              >outragiously large, but was just wondering if there was any. thanks!
              >
              I can't imagine there is one, but I'm no expert on things like that.
              However, I have seen classes that were very large in production
              applications running without problem. Curiousity or do you have a 300
              Method class on the way?
              >

              Comment

              Working...