vb.net aggregation question

  • Thread starter Thread starter ninjutsu28
  • Start date Start date
N

ninjutsu28

hi im juz a student so pls bear with my terminologies..juz wana ask how
to perform aggregation in vb.net code..
in my model, i have rectangle, shape, drawing classes..rectangle class
inherits shape class (is - a relationship), and drawing class has shape
class(aggregation)
Shape Class:
Public MustInherit Class CShape

Rectangle Class:
Public Class CRectangle
Inherits CShape

Drawing Class:
public class CDrawing
?????????????????

wat im tryin to do is aggregation, to show drawing class has
shapes..and i dont know how to perform it in code.. i kinda assume that
shape class cant be instantiated coz its the base class(not sure)..
any help will be really appreciated..cheers!
 
wat im tryin to do is aggregation, to show drawing class has

There are many ways, for example

Public Readonly Property Shapes() As List(Of Shape)...
Public Property Shapes() As Shape()
Public Readonly Property Shapes() as Collection
Public Readonly Property Shapes() as System.Array

or whatever. Just like mentioning that "person has money" does not imply
where and how the money is stored (on bank account, cash in wallet, cheque,
whatever)

-h-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Moving character Glyphs 12
Help with C# to VB.Net Conversion 6
Panel flicker 4
Sudoku Solver question... 7
GDI Question 4
Interfaces, Big Deal!! 21
Question on Sample Code 7
Flat Combobox Code 2

Back
Top