ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Making Sense of Partial Classes
Subject:   Can we extend the Class without inheriting an existing class
Date:   2004-12-10 03:39:24
From:   SK.NET
Writting a class code into multiple file may allow to extend the functionality of an existing Class in as seperate file.
What will happen if I have a class Account written in Account.vb and I write another file having partial Account class in Accounts_extend.vb
wont it violate the encapsulation because since this belong to same class so I can access the private members from my new defination. If this is true then there could be potential hazard using such approach.
I am not sure if I am correct in my understanding of partial class thats why I am posing the above query even if it may sound silly, but please clarify my understanding


Thanks
SK


1 to 1 of 1
  1. Can we extend the Class without inheriting an existing class
    2005-01-24 20:47:06  GersonK [View]

1 to 1 of 1