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. Class Diagram relation issue [modified]

Class Diagram relation issue [modified]

Scheduled Pinned Locked Moved C#
visual-studiohelp
5 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.
  • S Offline
    S Offline
    Saira Tanwir
    wrote on last edited by
    #1

    hi fellows i'm creating a class diagram in VS 2005, the class diagram option shows me all the classes of the project but it doesn't show the links between classes. Is this because half my classes are "Serializable" Do reply Sair -- modified at 3:52 Thursday 19th April, 2007

    P 1 Reply Last reply
    0
    • S Saira Tanwir

      hi fellows i'm creating a class diagram in VS 2005, the class diagram option shows me all the classes of the project but it doesn't show the links between classes. Is this because half my classes are "Serializable" Do reply Sair -- modified at 3:52 Thursday 19th April, 2007

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

      No - it's because it can't detect links between your classes, e.g. because you haven't inherited one from another.

      Deja View - the feeling that you've seen this post before.

      S 1 Reply Last reply
      0
      • P Pete OHanlon

        No - it's because it can't detect links between your classes, e.g. because you haven't inherited one from another.

        Deja View - the feeling that you've seen this post before.

        S Offline
        S Offline
        Saira Tanwir
        wrote on last edited by
        #3

        most of my classes are serializable i.e. thay cannot be inherited. can u explain a little about Links between classes?

        P 1 Reply Last reply
        0
        • S Saira Tanwir

          most of my classes are serializable i.e. thay cannot be inherited. can u explain a little about Links between classes?

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

          Errm - you can inherit serializable classes. Who told you that you couldn't? Take the following example:

          [Serializable]
          public class A
          {
            private int count = 0;
            public virtual void OnInit()
            {
              count = 10;
            }
          }
          
          [Serializable]
          public class B : A
          {
            public override void OnInit()
            {
              base.OnInit();
            }
          }
          

          As you can see, B inherits from A. This is perfectly acceptable (and both classes would serialize just fine.

          Deja View - the feeling that you've seen this post before.

          S 1 Reply Last reply
          0
          • P Pete OHanlon

            Errm - you can inherit serializable classes. Who told you that you couldn't? Take the following example:

            [Serializable]
            public class A
            {
              private int count = 0;
              public virtual void OnInit()
              {
                count = 10;
              }
            }
            
            [Serializable]
            public class B : A
            {
              public override void OnInit()
              {
                base.OnInit();
              }
            }
            

            As you can see, B inherits from A. This is perfectly acceptable (and both classes would serialize just fine.

            Deja View - the feeling that you've seen this post before.

            S Offline
            S Offline
            Saira Tanwir
            wrote on last edited by
            #5

            VS 2003 that i'm working with tells me that serializable classes can't be inherited. i haven't tried inheriting them myself. i'll just try it for myself. Thanks for the example. Regards:rose:

            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