Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / August 2007

Tip: Looking for answers? Try searching our database.

Problem with associations

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alberto - 16 Aug 2007 11:40 GMT
I have 2 classes, A and B. In the A class, I've created an attribute of type
B():  private b = new B();
In other words, I have an association from A to B.

The problem occurs when I export the project to Visio-UML because doesn't
export the association.
Does anybody know why?
Thank you very much.
Alberto - 16 Aug 2007 11:57 GMT
Sorry, the declaration of the attribute b is private B b = new B();

>I have 2 classes, A and B. In the A class, I've created an attribute of
>type B():  private b = new B();
[quoted text clipped - 4 lines]
> Does anybody know why?
> Thank you very much.
Nicholas Paldino [.NET/C# MVP] - 16 Aug 2007 15:51 GMT
Alberto,

   In .NET, this is not an attribute, but rather, a field.  Attribute has a
specific meaning in .NET, different from how you are presenting it here.

   Chances are that it is not being exposed in UML because it is private.
It doesn't affect the public interface of A, which is why it doesn't show
up.  Expose it as public (either change the field to public, or expose a
public property which returns the value), and it should show up.

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

>I have 2 classes, A and B. In the A class, I've created an attribute of
>type B():  private b = new B();
[quoted text clipped - 4 lines]
> Does anybody know why?
> Thank you very much.
Alberto - 16 Aug 2007 17:47 GMT
Anyway, I've created the association with the object designer of visual
studio and it created the public property. After that, I've exported it to
visio and the association didn't appear.
Thank you.

> Alberto,
>
[quoted text clipped - 14 lines]
>> Does anybody know why?
>> Thank you very much.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.