Class Diagram relation issue [modified]
-
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
-
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
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.
-
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.
most of my classes are serializable i.e. thay cannot be inherited. can u explain a little about Links between classes?
-
most of my classes are serializable i.e. thay cannot be inherited. can u explain a little about Links between classes?
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.
-
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.
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: